PDA

View Full Version : how to use CSS to vertically allign...?



Beaulne
November 27th, 2006, 02:09 PM
I have a site that I would like to valign but am not sure how to go about it... I read the tutorial on the kirupa site but that did not work... so what i have so far is....

div#main {
margin-top: auto;
margin-bottom: auto;
height: 100%;
}

but all that displays is my content at the top of the page... please help!

also if there is another way other then CSS i will take your help :)

thank you

Jeff Wheeler
November 27th, 2006, 02:28 PM
Kinda tough to do, but this page should give some insight: http://www.wpdfd.com/editorial/thebox/deadcentre4.html

icio
November 27th, 2006, 03:48 PM
I always use this solution: http://www.jakpsatweb.cz/css/css-vertical-center-solution.html

Jeff Wheeler
November 27th, 2006, 06:04 PM
That's actually pretty much the the same thing with a nice write-up. Great link, thanks. :)

icio
November 28th, 2006, 06:25 AM
Yeah, it's a good implementation