Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome not support box-sizing?

Tags:

css

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?

like image 915
Liam Avatar asked Jan 24 '13 16:01

Liam


2 Answers

Padding-box isn't currently supported in chrome

Source: https://developer.mozilla.org/en-US/docs/CSS/box-sizing#Browser_Compatibility

like image 140
Andy Avatar answered Oct 03 '22 04:10

Andy


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.

like image 41
KatieK Avatar answered Oct 03 '22 05:10

KatieK