FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Vertically centering site in window using CSS?





tingkagol
HELP.

I've scoured the net on how to VERTICALLY center your site on the browser window, and I've found this:

Code:
table {
   width: 100%;
   height: 100%;
}

td {
   vertical-align: middle;
}

Code:
<table border=0>
   <tr>
      <td>
         <div class="container">
            <div class="left">
               Top content
            </div>
            etc.
         </div>
      </td>
   </tr>
</table>


That is, declaring tables' height and width 100%, and then using vertical-align: middle to vertically center td within the table.

HERE'S THE PROBLEM:
IT DOES NOT WORK. I tried coding it on Dreamweaver, and the results i see on the wysiwyg window are OK, but when I upload it to the net, it does not work. It is centered horizontally, but the whole thing remains docked on the top of the page.

? ? ? ? Confused
Reign
Look at the code
http://flash.reignofterror.be/etrexlegend.css
http://flash.reignofterror.be/

I used a program for this, just because its fast and easy but once you have the code you can easily adjust it to your website...

The Program
/* Generated by CenterFlashInxHTML.exe, available on http://www.pieterhoste.tk */

You might need the .net framework to run the program...
Related topics
Okay, I'm done trying to use CSS for layout.
CSS OR TABLES
Dynamic User Customizable Sites. CSS + PHP = Awesome!
What's the best way to design a site?
Some questions
Rotate images using css?
Help With Positioning Background Image.
CSS DIV layout advice
How do I center my layout
[Resolved]Using css to create a link.
planning a site in CSS
Keanetix - my portfolio and blog
How change the property TARGET of tag A (LINK) using CSS?
How change the background-image of a page using CSS?
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> Design Tips

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.