开发者

Mozilla CSS bug : table with bottom-border + border-collapse : causes random borders to appear and disappear

开发者 https://www.devze.com 2022-12-14 06:20 出处:网络
When applying a bottom border to a table, with border-collapse set to \"collapse\", weird random bottom borders appear below some table rows, of varying widths -- they appear and disappear when scroll

When applying a bottom border to a table, with border-collapse set to "collapse", weird random bottom borders appear below some table rows, of varying widths -- they appear and disappear when scrolling, sort of like the IE6 "peekaboo bug"; resizing the window, or switching to another application and back again, makes them go away, scrolling makes them reappear again.

This affects all Mozilla browsers (Mac & PC) including Firefox, Camino, and Flock -- and only mozilla browsers.

Example:

http://platypusman.com/mozilla_table_border-bottom_border-collapse.html

The CSS:

table.grid { 开发者_C百科border-collapse: collapse; border-bottom: solid 15px #ccc; }
table.grid td { border: solid 1px #ccc; padding: 5px; }

Removing "border-collapse" fixes the issue.

It's only caused by a BOTTOM border on the table -- removing the bottom border fixes the issue. E.g.:

table.grid { border-collapse: collapse; border: solid 15px #ccc; border-bottom: none; }
table.grid td { border: solid 1px #ccc; padding: 5px; }


This was fixed, probably by the border collapsing rewrite, which will be included in the next major Firefox version after 3.6.

0

精彩评论

暂无评论...
验证码 换一张
取 消