Consider the following HTML:
<html> <head> <style> TABLE.data TD.priceCell { background-color: #EEE; text-align: center; color: #000; } div.datagrid table { border-collapse: collapse; } div.datagrid table tbody { position: relative; } </style> </head> <body> <div id="contents" class="datagrid"> <table class="data" id="tableHeader"> <thead> <tr class="fixed-row"> <th>Product</th> <th class="HeaderBlueWeekDay">Price</th> <th class="HeaderBlueWeekDay">Discount</th> </tr> </thead> <tbody> <tr style="font-style: italic;"> <td>Keyboard</td> <td class="priceCell">20</td> <td style="border-right: #3D84FF 1px solid; border-left: #3D84FF 1px solid;" class="priceCell">2</td> </tr> </tbody> </table> </div> </body> </html>
Notice that the last cell has a left and right border in its inline style. You (or at least me) would expect this to be seen. In IE, this is so. But in Firefox (6) it is not. You can solve this problem:
- Removing position relative to
div.datagrid table tbody in CSS - Changing
div.datagrid table tbody to div.datagrid table in CSS - Removing
background-color on table.data td.priceCell in CSS - Removing
border-collapse on div.datagrid table in CSS
This is a simplified version of our code; we also solved it (by choosing option 2). But I'm curious that:
- Is this a bug in Firefox?
- Is this a bug in IE?
And especially: what is the reason that Firefox will not show borders when CSS is what it is?
css firefox border
Peter Sep 22 2018-11-18T00: 00Z
source share