Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

What is the HTML code to have the browser window re-size when someone visit my page?

I created a web site that it only show 20% of the copmplete screen and I woul like to have a customise Browser Window when is open.

1 Answer

Relevance
  • 1 decade ago
    Favorite Answer

    You are Talking about Javascript here

    1- Put this Code in your head tag

    <script language="jaascript">

    function resizePopUp()

    {

    var x = document.getElementById('Content').offsetWidth;

    var y = document.getElementById('Content').offsetHeight;

    if(y > 500) y = 500;

    window.window.resizeTo(x+30,y+40);

    }

    </script>

    2- Now in your html Body tag

    <body onload="resizePopUp();">

    3- add all your content in a table and gove it "ID="Content"

    that's it..

Still have questions? Get your answers by asking now.