Forum Moderators: open
I have to build a site with tables and get the 'in the centre of the screen effect'.
I thought by nesting the content table within an outer container table would work but it's failing miserably. Can anyone see what I'm doing wrong?
[pre]
<table width="100%" height="100%">
<tr>
<td>
<table width="750px" height="400px" align="center"
valign="middle" bgcolor="#818286" cellspacing="0"
cellpadding="0">
<tr>
<td colspan="2"><img src="top-banner.jpg" alt="" /></td>
</tr>
<tr>
<td height="240px" width="400px"
bgcolor="#FFFFFF"> </td>
<td height="240px" width="350px" > </td>
</tr>
<tr>
<td colspan="2"><img src="bottom-banner.jpg" alt="" /></td>
</tr>
</table>
</td>
</tr>
</table>
[/pre]
Many thanks...
Nick
It could be that the <td> in which your 2 table is nested is defaulted align=left.
Try aligning it to the center:
<table width="100%" height="100%">
<tr>
<td align="center">
<table width="750px" height="400px" align="center" valign="middle" bgcolor="#818286" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2"><img src="top-banner.jpg" alt="" /></td>
</tr>
<tr>
<td height="240px" width="400px" bgcolor="#FFFFFF"> </td>
<td height="240px" width="350px" > </td>
</tr>
<tr>
<td colspan="2"><img src="bottom-banner.jpg" alt="" /></td>
</tr>
</table>
</td>
</tr>
</table>
Blessings,
Barry
hee heeNick_W using tables
You behave 4eyes! Sheesh, this is odd work, I've not done such a rigid design in ages... fixed pixel fonts, <shudder>tables</shudder>.. takes me back to my DW days ;)
Oh well, it's all experience and good to brush up on this kind of thing from time to time...
Thanks all, I think I've got it now ;)
Nick
height="200", not height="200px". You have been doing markup in CSS for too long. ;)
[edited by: moonbiter at 7:42 pm (utc) on Oct. 24, 2002]