centering of webpage for all monitor types

Discussion in 'HTML & Website Design' started by wanrey, Jan 29, 2009.

  1. #1
    This may be a stupid question, but if I don't ask I will never know the solution so if it is stupid do not be very harsh please.

    Here goes

    I have a website that I created with a WYSIWYG editor ,everything appears ok with it, the one problem is when viewed on some laptops that do not have the traditionally proportioned screen, they have the new thinner and wider style ,I'm sure there must be a name for this but I don't know it sorry. On these screens ,what is usually centered and looks fine on al traditionally proportioned monitors (all screen resolutions) is all pushed over to the left hand side of the screen the remainder of the screen being filled with my webpage background. It appears this way on my husbands laptop......he says I should fix it Great wish he'd tell me how ? The same effect is present on one of my daughters laptops but not to the same exaggerated degree, on other daughters laptop all looks fine.
    Now here's the question is there some html code that tells the webpage to be centered on all screen dimensions or is it some setting that needs to corrected on the laptops .

    thanks Wanrey
     
    wanrey, Jan 29, 2009 IP
  2. dlb

    dlb Member

    Messages:
    203
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    35
    #2
    Wrap your entire design with a DIV.

    <div id="container">
    YOUR FULL SITE CODE
    </div>

    Then in the CSS;
    #container { width:whatever; margin:0 auto; }
     
    dlb, Jan 29, 2009 IP