Posted By

Japegrape on 10/19/12


Tagged

css width margin height padding Box-Sizing


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Japegrape


CSS Box Sizing


 / Published in: CSS
 

URL: http://css-tricks.com/box-sizing/

This code modifies the default Box Sizing model from its regular style, "Content Box," to the much more sensible "Border Box," which does not include padding on top of width/height values.

  1. *, *:before, *:after {
  2. -webkit-box-sizing: border-box;
  3. -moz-box-sizing: border-box;
  4. box-sizing: border-box;
  5. }

Report this snippet  

You need to login to post a comment.