Making stuff as a founder of Avocado. Former music-maker. Tuna melt advocate. Started Google Reader. (But smarter people made it great.)

When a CSS border is applied to a table cell, should Netscape/Mozilla add the value of that border to its width?

On CSS and frustration:
I wanted to have a number of HTML elements/containers lined up along a horizontal axis whose width I could dynamically assign. Like so:

I was thinking SPANs aligned along a horizontal axis...
But then I found out that SPAN elements don't respond to width, height, margin-top, or margin-bottom in Mozilla/Netscape6.1 or Opera 5.2. So then I thought well, let's use tables, they're still considered valid HTML.

But then I ran into a new box model problem.

CSS width test - SPAN vs. TD vs. DIV

span

div
table cell

IE 5, IE 5.5, IE 6 and Netscape 6.1/Mozilla 0.9.4 disagree on whether to add the border to the width of the table cell. It seems that Netscape 6.1 will not add the border to the width...a cursory look at Opera 5.2 and the various versions of IE suggests that they do add the border to the width. Don't quote me on that, wait a bit and I'll verify that as soon as I can.

So, shouldn't the box model diagram for block-level elements apply to table cells? Or are table cells unique? Am I missing something?

Well...it wouldn't be the first time.

Posted at September 26, 2001 12:50 AM
Main | massless.org continued... >>
"I laughed in my sleep. So, the story goes. Must've just been dreaming of the latest Onion."