Hi all, Im trying to place my site dead center on the page and have added the following code to my page: #horizon { color: white; background-color: #0ff; text-align: center; position: absolute; top: 50%; left: 0px; width: 100%; height: 1px; overflow: visible; visibility: visible; display: block } But the top of my site now seems to stick to the center if the page which obviously means im doing things wrong, could anyone advise me were im going wrong?? site http://www.glen-lodge.co.uk/quilly/quilly.html
Vertically aligning a divider can be problematic from one browser to the next. I suggest you consult the page below. It should answer your question, and then some! http://stylizedweb.com/2008/02/01/vertical-align-div/
The best way is called a 'Liquid layout'. I usually do place everything in a DIV class called .container. .container { margin-left:auto; margin-right:auto; width:1024px; (or whatever width u want ur page) } place everything on ur page inside a div like this <body> <div class="container"> Your page elements </div> </body> </html>