Web Hosting, Design, & Coding forum

General discussion

Browser window size control

by raytime / May 25, 2005 1:54 AM PDT

Hello Cnet world - I am trying to create a home page for a new website that opens the IE browser so that it just fits the page content. The behavior I'm looking for is:
- I enter the URL for my web page in the Address window of the browser (not an href link from an open web page)
- My web page opens in the same browser and adjusts its size to fit the content of my page.

This is the behavior I see for many web pages but I can't find the right html or js to make it happen. Setting the <body TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0" doesn't do it.


Discussion is locked
You are posting a reply to: Browser window size control
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Browser window size control
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
use resizeTo()
by slim___shady / May 25, 2005 8:18 AM PDT

like so

<body onload="resizeTo(300,400)">

where 300 is the width and 400 is the height of the window

Collapse -
resizeto works fine
by raytime / May 25, 2005 11:04 AM PDT
In reply to: use resizeTo()


Collapse -
glad i could help
by slim___shady / May 26, 2005 7:38 AM PDT
In reply to: resizeto works fine
Popular Forums
Computer Newbies 10,686 discussions
Computer Help 54,365 discussions
Laptops 21,181 discussions
Networking & Wireless 16,313 discussions
Phones 17,137 discussions
Security 31,287 discussions
TVs & Home Theaters 22,101 discussions
Windows 7 8,164 discussions
Windows 10 2,657 discussions


We are giving away 'Black Panther' swag!

Four lucky readers will be taking home *Marvel*ous "Black Panther" prizes, including magazines autographed by the King of Wakanda himself! Giveaway ends Feb. 25, 2018.