Force a browser to open at a certain size?

LawnMMLawnMM Colorado
edited February 2005 in Internet & Media
Is there a way you can force a browser window to open at a specific size? Say you design your site to be best viewed at a certain resolution which you make the web surfer aware of at an intro page. Can you add a button with some html or javascript that will open a new window at the specified resolution so they're automagically viewing your site at the optimized resolution?

Comments

  • KwitkoKwitko Sheriff of Banning (Retired) By the thing near the stuff Icrontian
    edited February 2005
    <body OnLoad="self.resizeTo(x,y)">
  • a2jfreaka2jfreak Houston, TX Member
    edited February 2005
    It would be better to have a div element set to the size you want and center it in the page, that way the ultra-annoying action of having one's browser resized is not performed. Also, having a div element set to the size you want means everything looks very very similar on all resolutions, albeit smaller the higher the resolution.

    Want a page optimized to 800x600? < div style="width: 800px;" > content of page < /div >
  • LawnMMLawnMM Colorado
    edited February 2005
    What does the div element do? Sorry, something of an html noob here.
  • a2jfreaka2jfreak Houston, TX Member
    edited February 2005
    Here's an example.

    <div style="text-align: center;">
    <div style="width: 400px; border: solid black 1px; width: 750px; margin: 0px; margin-left: auto; margin-right: auto; padding: 4px; text-align: left;">
    This is the body of my message. It is written inside a div elemen which itself is inside a div element. The parent div element is for IE to center the second div. The second div is centered in Gecko-based browsers via the margin styles.

    More text.
    Visit Short Media or Icrontic

    You can also do your taxes for free on the H & R Block web-site (According to the IRS it's only free if you go through their site.)
    </div>
    </div>

    [php]
    <div style="text-align: center;">
    <div style="width: 400px; border: solid black 1px; width: 750px; margin: 0px; margin-left: auto; margin-right: auto; padding: 4px; text-align: left;">
    This is the body of my message. It is written inside a div elemen which itself is inside a div element. The parent div element is for IE to center the second div. The second div is centered in Gecko-based browsers via the margin styles.

    More text.
    Visit Short Media or Icrontic

    You can also do your taxes for free on the H & R Block web-site (According to the IRS it's only free if you go through their site.)
    </div>
    </div>
    [/php]
Sign In or Register to comment.