Wednesday, October 9, 2013

box-sizing:border-box;

Seems to allow you to specify a width and height for a div that will include the measurements for padding and border. This is in contrast to box-sizing:content-box; which is the default setting forcing settings of greater than zero for padding and border width/height to add onto the width/height of the element they decorate. This suggests that good CSS to use for this is:

-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;

No comments:

Post a Comment