how to resize and center window crossbrowser compatible

Discussion in 'Web Design and Development' started by Anarchy99, May 31, 2009.

  1. Anarchy99 macrumors 6502

    Joined:
    Dec 13, 2003
    #1
    im working on a site and when the main page opens i want it to resize to 1024-768 and center while only showing the top titlebar
    i know its possible ive seen zillions of popup ads do it
    but now that i want a example i cant find one anyone got a idea how?


    thanks
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    You have to use JavaScript. Here's a tutorial. Though you should consider that most people hate it when you pop open windows and resize things like their window. I have that stuff blocked on my browser so you should make sure it doesn't break for people like me, otherwise you'll lose visitors.
     
  3. Yvan256 macrumors 601

    Joined:
    Jul 5, 2004
    Location:
    Canada
    #3
    Tip: don't mess with the user's browser.

    If a website loads and messes with my browser window, I immediately close it and never go there again.

    What you should do is center your content in the browser window (without resizing the window itself).
     
  4. Darth.Titan macrumors 68030

    Darth.Titan

    Joined:
    Oct 31, 2007
    Location:
    Austin, TX
    #4
    ^^^^^
    What he said. Nothing is more annoying than a site resizing my window. If you want to maintain your layout, use a fixed width layout.
     

Share This Page