HTML Center a table vertically?

travis30384

New member
Hey, what I need to do is create a table that is centered vertically in a page, and horizontally. It's 100 percent wide, so horizontal doesn't really matter, but I have problems with vertical centering. I've read dozens of help pages, but none of them seem to work. I have the following code:

<table width="100%" height="100%" border="0" cellPadding="0">
<td width="12%">Â*</td>
<td width="10%"><span class="style1">linkkkkkkkkkk</span></td>
<td width="66%">Â*</td>
<td width="12%">Â*</td>
</tr>
</table>

Now, that table comes out fine in dreamweaver, but when I test it on firefox, it's not 100 percent of the height.
Yeah Johnny? Use CSS? Tried 4 different ways of that. Please help, I see you have -21 points this week, from your junk answers.
 
give your table an id #
Example
<table id="main-table" width="100%" height="100%" border="0" cellPadding="0">

then in your CSS put
#main-table{
vertical-align: middle;
}

that should do it i hope
 
Back
Top