5

Is there any reason Firefox is removing 1px the the border's value as I define in the CSS file?

.aprovGriditem th
{
   border-collapse: collapse;
   border: 4px solid #BBC6E3;
   padding: 0;
}

EDIT

<table cellpadding="0"  cellspacing = "1" runat="server" id="tblEmployees" width="100%">
 <tr id="tr1" runat="server" class="aprovGriditem">
   <td>
        <asp:Label ID="Label1" runat="server">
   </td>
</tr>
</table>

When I check firebug, I see the border's value is 3. When I set the value to 3, I get 2. And how to deal with that?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Richard77
  • 20,343
  • 46
  • 150
  • 252

1 Answers1

1

I don't have a grand explanation but in testing with the fiddle it seems firefox reacts differently than other browsers when the border-collapse is placed on only one element type within the table. Move the border-collapse to the entire table:

#tblEmployees{
   border-collapse:collapse;
}
.aprovGriditem th
{
   border: 4px solid #BBC6E3;
   padding: 0;
}
Matthew
  • 146
  • 2