positioning

    Date: 05/21/05 (WebDesign)    Keywords: css, java

    Hello,

    Is there a way to center the content of a page vertically using css ?
    What I'm looking for is the equivalent of something like :
    #container { margin:0px auto; }
    This would center the content horizontaly, but setting top and bottom margin to auto won't center it vertically.
    The idea is that all the content would go in a div, and depending on the screen resolution, there would be margins above and below.
    I know one can detect a screen resolution using javascript, but I was wondering if there was a way to do this using css, so it would be W3C valid, as the "align" property is deprecated for div.
    Any idea ?
    Thx all for you help.

    Source: http://www.livejournal.com/community/webdesign/886035.html

« Centering the contents of... || Community suggestions »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home