View Full Version : Vertical Centering
camargo
March 2nd, 2006, 07:36 PM
Hi all,
Quick question... I have a page: http://www.wirelessinteractive.com/nolimits/
I'd like the content to be centered horizontally AND vertically. How do I go about doing it?
Thanks in advance!
DDD
March 2nd, 2006, 07:43 PM
To get it vertically centered you will have to use 1 table. 1 column and 3 rows. 1st row and last row heigh set to 50%. With the whole table height set to 100% That will make the center row vertically centered
camargo
March 2nd, 2006, 08:33 PM
OK, I set the existing table in the center row of the table you suggested. But both IE and FireFox still show it at the top of the page. You can take another look at the link (http://www.wirelessinteractive.com/nolimits/)to see the source.
Psykloak1
March 3rd, 2006, 08:39 PM
Try this:
<html><head>
<style>
body, html {height: 100%;}
#outer {height: 100%; overflow: visible;} /* or without overflow */
</style>
</head><body>
<table id="outer" width="100%" border="0">
<tr>
<td>=)</td>
</tr>
</table>
</body></html>
Got the code from: http://www.jakpsatweb.cz/css/css-vertical-center-solution.html
Though they use <div> instead of <table>. Call me old fashoned, but I changed it to work on a regular table. Check the link for the whole step by step thing.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.