When it comes to IE's bug, a notorious example is its erroneous interpretation of the "box model": In the ie5.x and Quirks mode Ie6/7, border and padding are included within the width. This adds a lot of trouble to the work of the front-end engineer, and a couple of boxes that need to define the size have to think about it: "Box model Bug"?
At the same time, because of the standard compliance of another set of browsers, we also need to calculate the exact definition of a box that is displayed in a limited space: the space left to it is only that big, and the border and the padding, how much should we write its width?
This situation has improved in the CSS3 era, thanks to this property called Box-sizing, which has two values of "Content-box" and "Border-box".
Define Box-sizing:content-box; , the browser's interpretation of the box model conforms to the standards we have previously recognized;
Define Box-sizing:border-box; , the browser's interpretation of the box model is the same as IE6;
Why is this attribute "late"? IE's interpretation of the box model is not in line with the specification, but it also has its advantages: regardless of changes in the value of border and padding, will not cause the box total size changes, will not disrupt the overall layout of the page. And in modern browsers such as Firefox, if we want to change the value of padding, we have to recalculate box width. Now that IE6 is dead, this CSS property is a bit late.
Try this new property, Firefox Please use-moz-box-sizing,safari/webkit use-webkit-box-sizing,opera directly with box-sizing can.
CSS3 Tutorial: Understanding the Box-sizing property border, padding and container width relationship