Firefox:盒子模型的解释错误? [英] Firefox: wrong interpretation of box model?
本文介绍了Firefox:盒子模型的解释错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚发现了Firefox的奇怪行为。
I just discovered strange behaviour of Firefox.
如果我有一个100像素高度的表格单元格,并添加了20px填充 - 它的总高度应该变成140像素。
If I have a table cell of 100px height, and add 20px padding to it - it's total height should become 140px.
所有浏览器都正常运行,Firefox 8.0忽略了填充:
All browsers act correctly, Firefox 8.0 ignores the padding:
任何知道修正的人?
推荐答案
似乎最好的跨浏览器解决方案可能是设置表行的全高度等于单元格的高度和填充:
It seems the best cross browser solution may be to set the full height of the table row equal to height and padding of the cell:
tr {height: 140px;}
$ b b
请参阅: http://jsfiddle.net/8wDde/19/
这篇关于Firefox:盒子模型的解释错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文