On May 18, 2006, at 8:55 AM, Jim Barraud wrote:

> Essentially I'm working with a table with a width of 100%. On the top
> and bottom of the table are divs with a width of auto (to allow for
> inner padding). These are used for pagination, etc. The table has a
> border applied to all the table cells. The divs and table have the
> same exact width and are fluid. That is until I set border-collapse to
> collapse. When collapse is applied, the left side of the table extends
> over 1 pixel in Firefox and 1 pixel over to the right in Safari. I
> forget what it does in IE, I'm away from my test PC at the moment.
>
> Has anyone else run into this behavior, know what the cause is,  
> workaround, etc?
>
> My guess is that the calculation of the table width is different (and
> for some reason off) when border collapse is set to collapse. But it's
> just that.. a guess. Mostly based of the W3C spec:
> http://www.w3.org/TR/REC-CSS2/tables.html#collapsing-borders
>
> I've set up a test case to demonstrate what I'm talking about. Any
> help is appreciated.
>
> Test Case: http://jimbarraud.com/lab/borderCollapseTest.html

It is more complicated, or simple..;-)
The border on a <table> is put half inside, half outside
Put a 10 px border on it, and then a 5 px border on td/th, and you  
start to see what happens [1].
And check out the illustration under 17.6.1 [2]

Gecko is correct in this.
The problem, as far as your test case is concerned, how to slice 1px  
in two on screen :-)
Safari puts it all inside, while Gecko puts it outside (and Opera  
always put it inside, anyway, which is wrong according to css2.1). IE  
barely understands border-collapse, so it goes on another trip.

[1] or look here:
<http://dev.l-c-n.com/tables/borderCollapseTest.html>
[2] <http://www.w3.org/TR/REC-CSS2/tables.html#borders>

Philippe
---
Philippe Wittenbergh
<http://emps.l-c-n.com>




______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to