开发者

Why is box sizing set to border-box for tables in 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?


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.


There really isn't any HTML or CSS standard that says how HTML should be styled by default. That's why reset stylesheets are so popular. Largely, each browser just goes with the prevailing behaviour of the other browsers. This would go back to the early Netscape and IE behaviour when tables were first introduced.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜