Sent by Zoe M. Gillenwater on 4 January 2005 14:02
Richard Hawking wrote:
> I did ask about this some time ago, but though some people were kind
> enough to try to help, I could never get to the bottom of it.
>
> The table on this page: http://randomhawk.com/MA/5622/m2a1.html
>
> should have a white gap between the grey border and the content of the
> table. In Windows IE this gap vanishes, and the content is pushed hard
> against the border.
Richard,
It seems as though the only way to do this would be to add a div around
the table and assign the border to this.
It's not clear to me whether FF or Opera should actually be obeying your
padding rule. Cellpadding is accomplished by using padding on the td or
th elements only, and cellspacing is accomplished not with margin but
with border-spacing and border-collapse set to separate. IE doesn't
support this, of course, and regardless, it affects the space between
the table and all cells, so it doesn't do exactly what you want.
However, it appears I may be mistaken about what padding may be applied
to. The spec says it may be applied to "all elements except element
with table display types other than table, inline-table, and
table-cell." If I'm reading that poorly constructed sentence correctly,
padding *should* apply to the table element because it has a display
value of "table."
So I guess IE just has a screwed up table model and/or poor support for
CSS in regards to tables. My suggestion to use an extra div for the
border stands, if you must have this visual effect in IE.
Zoe
--
Zoe M. Gillenwater
Design Specialist
Highway Safety Research Center
http://www.hsrc.unc.edu
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/