Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Firefox keeps removing 1px to the table cell's border?

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?

like image 204
Richard77 Avatar asked Nov 13 '22 22:11

Richard77


1 Answers

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;
}
like image 193
Matthew Avatar answered Nov 15 '22 12:11

Matthew