[thelist] Mozzila refusing to collapse table cell to 1px

Andy Warwick andy.war at ntlworld.com
Mon May 28 06:28:53 CDT 2001


Hi list,

I'm trying to create a table in XHTML transitional that has a colored table
cell that is only 1 pixel high, to form a thin resizing rule. The code I'm
using is as follows:

===============================================================

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
Rule Test
</title>
<style type="text/css"><!--
    .blue_bkgnd { background: #99ccff; }
    -->
</style> 
</head>
<body>
<table border="0" cellspacing="2" cellpadding="0">
<tr>
<td class="blue_bkgnd">
<img alt="" width="300" height="1" src="shim.gif" />
</td>
</tr>
<tr>
<td class="blue_bkgnd">
<p>
Lorem ipsum dolor trans mundi fugit.
</p>
</td>
</tr>
</table>
</body>
</html>

===============================================================

It works fine in IE5 (Mac) and Netscape 4.73 (Mac), but breaks in Mozilla
0.9 (Build 2001050518); the first cell doesn't collapse to be 1 pixel high.
I've tried adding height="1" to the <td> tag with no joy. Does any one have
any suggestions on a workaround, or is this a bug I'll have to live
with/report to the mozilla team?

(The padding and margins around the <p> tag in mozilla are also very
different to IE and Netscape; another bug in Mozilla, or are the other
browsers wrong here?)

Regards

Andy Warwick





More information about the thelist mailing list