472,145 Members | 1,625 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

Table cell height & standards

Hi!

I noticed that for the following code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sl" lang="sl">
<head>
<title>Test</title>
</head>
<body>
<table width="100" border="0" cellspacing="0" cellpadding="0"
style="padding: 0px; border-collapse: separate;">
<tr>
<td style="width: 100px; height: 30px; border: 1px solid
#000000;">Test.</td>
</tr>
</table>
</body>
</html>

IE 6 and Mozilla 1.7.3 render differently. Mozilla counts border
into height (so that content space height is 28px) and IE does not (it
draws border around 30px height content space). I thought - IE is wrong.
But is it?

From http://www.w3.org/TR/REC-CSS2/images/tbl-spacing.gif it is clearly
visible that border is not counted into cell width (so it is probably
the same with height).

So what is correct by standards?

And is there a way around this difference in rendering?
Mike
Jul 23 '05 #1
3 5508
> IE 6 and Mozilla 1.7.3 render differently. Mozilla counts border
into height (so that content space height is 28px) and IE does not (it
draws border around 30px height content space). I thought - IE is wrong.
But is it?


I believe IE is wrong and that Mozilla is right. See...

http://tantek.com/CSS/Examples/boxmodelhack.html

Unfortunately, the IE way, though wrong, makes more sense. Read about
this in Zeldman's book "Designing with Web Standards."

Mario T. Lanza
Clarity Information Architecture, Inc.
2004.09
Jul 23 '05 #2
On 29 Sep 2004 23:03:30 -0700, Mario T. Lanza <ml****@lycos.com> wrote:
I believe IE is wrong and that Mozilla is right.


Whatever it is, I agree! :)
Jul 23 '05 #3
HI!

Mario T. Lanza wrote:
IE 6 and Mozilla 1.7.3 render differently. Mozilla counts border
into height (so that content space height is 28px) and IE does not (it
draws border around 30px height content space). I thought - IE is wrong.
But is it?


I believe IE is wrong and that Mozilla is right. See...

http://tantek.com/CSS/Examples/boxmodelhack.html

Unfortunately, the IE way, though wrong, makes more sense. Read about
this in Zeldman's book "Designing with Web Standards."


This page works in IE 6 (and Mozilla). And this is not the same problem.
And the left and right borders are not a problem. Top and bottom ones
are. Read more at Bugzilla:

https://bugzilla.mozilla.org/show_bug.cgi?id=248239
Mike
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

61 posts views Thread by Toby Austin | last post: by
7 posts views Thread by Andrew Poulos | last post: by
12 posts views Thread by plugwalsh | last post: by
1 post views Thread by Jeronimo Bertran | last post: by
reply views Thread by Thomas Scheiderich | last post: by
1 post views Thread by Stephen Takacs | last post: by
reply views Thread by Saiars | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.