# How to use CSS to vertically allign...?

**URL:** https://forum.kirupa.com/t/how-to-use-css-to-vertically-allign/208336
**Category:** Uncategorized
**Created:** [November 27, 2006, 7:09pm UTC](https://forum.kirupa.com/t/how-to-use-css-to-vertically-allign/208336 "2006-11-27T19:09:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Beaulne](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/beaulne/32/3027_2.png) [@Beaulne](https://forum.kirupa.com/u/Beaulne)
#### Post date: [November 27, 2006, 7:09pm UTC](https://forum.kirupa.com/t/how-to-use-css-to-vertically-allign/208336/1 "2006-11-27T19:09:08Z")

</div>

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
