Im working on a site and im using the box sizing method to stop divs breaking size when padding is added.
I have the following...
-moz-box-sizing:padding-box;
box-sizing:padding-box;
-webkit-box-sizing:padding-box;
Does anybody know of an issue regarding chrome supporting this?
Padding-box
isn't currently supported in chrome
Source: https://developer.mozilla.org/en-US/docs/CSS/box-sizing#Browser_Compatibility
You can use box-sizing: border-box;
in place of box-sizing:padding-box;
.
padding-box
is experimental, and includes padding size in the height and width of an element, but does not include border or margin.
border-box;
has been around for a while and includes padding size and the border in the height and width of an element, but not the margin. It's supported by all major browsers, but does require a prefix in Firefox. Example:
-moz-box-sizing: border-box;
box-sizing: border-box;
For more, see https://developer.mozilla.org/en-US/docs/CSS/box-sizing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With