methatron
03-30-2006, 07:19 AM
I have this really annoying problem with HTML tables I cant solve.
if you can, paste this code and run it somewhere and see what my problem is.
(I want the red TD's to be indeed 1px wide in the 2nd table as well).
the img is just a 1x1 transparent-pixel image so the TD wont be empty.
Thanks in advance.
code ->
<body>
<br><br>
<center>
why here the red TD's are indeed 1px wide
<table border="1" cellspacing="0" cellpadding="0" width="80%">
<tr>
<td style="width:1px; background-color:red;"><img src="/images_n/tp.gif" alt="" height="15" width="1"></td>
<td colspan="3" style="background-color:black;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
<td style="width:1px; background-color:red;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
</tr>
<tr>
<td colspan="2" style="background-color:black;"><img src="/images_n/tp.gif" alt="" height="15" width="1"></td>
<td style="background-color:aqua;"><img src="/images_n/tp.gif" alt="" height="1px" width="1"></td>
<td colspan="2" style="background-color:black;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
</tr>
</table>
<br><br>
why here the red TD's are NOT 1px wide
<table border="1" cellspacing="0" cellpadding="0" width="80%">
<tr>
<td style="width:1px; background-color:red;"><img src="/images_n/tp.gif" alt="" height="15" width="1"></td>
<td style="background-color:black;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
<td style="background-color:black;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
<td style="background-color:black;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
<td style="width:1px; background-color:red;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
</tr>
<tr>
<td style="width:1px; background-color:red;"><img src="/images_n/tp.gif" alt="" height="15" width="1"></td>
<td colspan="3" style="background-color:black;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
<td style="width:1px; background-color:red;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
</tr>
<tr>
<td colspan="2" style="background-color:black;">a</td>
<td style="background-color:aqua;">b</td>
<td colspan="2" style="background-color:black;">c</td>
</tr>
</table>
</center>
</body>
if you can, paste this code and run it somewhere and see what my problem is.
(I want the red TD's to be indeed 1px wide in the 2nd table as well).
the img is just a 1x1 transparent-pixel image so the TD wont be empty.
Thanks in advance.
code ->
<body>
<br><br>
<center>
why here the red TD's are indeed 1px wide
<table border="1" cellspacing="0" cellpadding="0" width="80%">
<tr>
<td style="width:1px; background-color:red;"><img src="/images_n/tp.gif" alt="" height="15" width="1"></td>
<td colspan="3" style="background-color:black;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
<td style="width:1px; background-color:red;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
</tr>
<tr>
<td colspan="2" style="background-color:black;"><img src="/images_n/tp.gif" alt="" height="15" width="1"></td>
<td style="background-color:aqua;"><img src="/images_n/tp.gif" alt="" height="1px" width="1"></td>
<td colspan="2" style="background-color:black;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
</tr>
</table>
<br><br>
why here the red TD's are NOT 1px wide
<table border="1" cellspacing="0" cellpadding="0" width="80%">
<tr>
<td style="width:1px; background-color:red;"><img src="/images_n/tp.gif" alt="" height="15" width="1"></td>
<td style="background-color:black;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
<td style="background-color:black;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
<td style="background-color:black;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
<td style="width:1px; background-color:red;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
</tr>
<tr>
<td style="width:1px; background-color:red;"><img src="/images_n/tp.gif" alt="" height="15" width="1"></td>
<td colspan="3" style="background-color:black;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
<td style="width:1px; background-color:red;"><img src="/images_n/tp.gif" alt="" height="1" width="1"></td>
</tr>
<tr>
<td colspan="2" style="background-color:black;">a</td>
<td style="background-color:aqua;">b</td>
<td colspan="2" style="background-color:black;">c</td>
</tr>
</table>
</center>
</body>