Log in

View Full Version : Table code issue



Vaz
09-01-2006, 09:38 PM
Hi, I'm using the following table code for one of my sites:



<td background="images/braker_vert.gif" valign="top" width="1"><img src="images/braker_vert.gif" height="3" width="1"></td>
<td valign="top" width="430"><table align="center" border="0" cellpadding="0" cellspacing="0" width="416">
<tbody>
<tr>
<td><img src="images/spacer.gif" height="4" width="10"></td></tr></tbody></table>
<table align="center" bgcolor="#000000" border="0" cellpadding="1" cellspacing="0" width="416"><tbody><tr>


<td>
<table align="center" bgcolor="#003366" border="0" cellpadding="1" cellspacing="2" width="416" background="./images/gradient.gif">
<tbody>
<tr>
<td class="headers">
Single box</td>
<td class="headers" align="right">&nbsp;</td>
</tr>
</tbody>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="416">
<tbody>
<tr>
<td>

<img src="images/spacer.gif" height="1" width="1">
</td>
</tr>
</tbody>
</table>
<table align="center" bgcolor="#f0f0f0" border="0" cellpadding="0" cellspacing="0" width="416">
<tbody>
<tr>
<td valign="top" width="416">
<table border="0" cellpadding="2" cellspacing="2" width="416">
<tbody>
<tr>
<td class="txtnorm" valign="top" width="416">
<p class="MsoNormal" align="right">
</p>Test of a single box</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table align="center" height="22">
<tbody><tr><td height="4"><img src="images/spacer.gif" height="2" width="10"></td></tr></tbody></table>

It seems to display a black cell if I view in IE and in firefox it doesnt. Does anyone know how to correct this problem and remove it ?

Thank you.

mburt
09-01-2006, 10:17 PM
The first td <td> tag is outside of your <table> tag? That's not correct.

jscheuer1
09-02-2006, 06:40 AM
A link to the page would be of more help.

Vaz
09-02-2006, 09:40 AM
Here's a link (http://www.dj-sati.com/vaz/proj/centres.php) to one of the pages.

jscheuer1
09-03-2006, 03:21 AM
Get rid of the red table:


<td class="headers">
Ley Street Centre</td>
<td class="headers" align="right">&nbsp;</td>

</tr>
</tbody>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="416">
<tbody>
<tr>
<td>

<img src="images/spacer.gif" height="1" width="1">
</td>

</tr>
</tbody>
</table>
<table align="center" bgcolor="#f0f0f0" border="0" cellpadding="0" cellspacing="0" width="416">
<tbody>
<tr>
<td valign="top" width="416">
<table border=

Add style to this table (inline as shown or in your stylesheet):


<table style="border-bottom:1px solid black;" align="center" bgcolor="#003366" border="0" cellpadding="1" cellspacing="2" width="416" background="./images/gradient.gif">
<tbody>
<tr>
<td class="headers">
Ley Street Centre</td>
<td class="headers" align="right">&nbsp;</td>

</tr>
</tbody>
</table>

Not required - However, you can combine the table's attributes into its style, except for its cellspacing, which could be applied as a margin style to its cell):


<table style="border-bottom:1px solid black;background:url('./images/gradient.gif') #003366;width:416px;margin:0 auto;" cellspacing="2">

Vaz
09-03-2006, 10:04 AM
Thanks again !! :D