By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,289 Members | 3,049 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,289 IT Pros & Developers. It's quick & easy.

Table cell height & standards

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
> 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

P: n/a
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

P: n/a
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.