Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is box sizing set to border-box for tables in Firefox?

Tags:

html

css

firefox

I found that making a table with

<table style="padding-left: 100px; width: 200px">

makes the content only 100px wide. Further investigation revealed that Firefox has

table { -moz-box-sizing: border-box };

rule in its default stylesheet. Is there a reason for that? Are tables supposed to be sized this way according to the CSS standard?

like image 483
avakar Avatar asked Nov 17 '10 22:11

avakar


1 Answers

that's strange, i see that you are right, even though mozilla itself says the default value should be content-box. Bug? Seems your only choice have to reset this in your css.

like image 167
Sebastian Patane Masuelli Avatar answered Sep 28 '22 10:09

Sebastian Patane Masuelli