Ian McNally

box-sizing: border-box

May 28, 2014

A good tip for keeping your div sizing sane is to set all elements box-sizing to border-box.

*, *:before, *:after {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

Ian McNally

Hey, I'm Ian. I build websites and write about what I learn as I go. Follow me on Twitter.