Dougal Campbell's geek ramblings

WordPress, web development, and world domination.

Box Sizing | CSS-Tricks

Tired of doing crazy calculations and adding unneeded wrapper divs to keep your web layouts from falling apart? You might want to try using ‘box-sizing’ to declare an alternate box model. Lets you keep padding ‘inside’ your declared container width, instead of adding to the overall width. It even works in IE8+!

Box Sizing | CSS-Tricks

About Dougal Campbell

Dougal is a web developer, and a "Developer Emeritus" for the WordPress platform. When he's not coding PHP, Perl, CSS, JavaScript, or whatnot, he spends time with his wife, three children, a dog, and a cat in their Atlanta area home.
This entry was posted in Whatever and tagged , , , , , , , , . Bookmark the permalink.

One Response to Box Sizing | CSS-Tricks

  1. Evan Mullins says:

    Yes, I’m a huge fan. I’ve been using this on all my sites for the past 6 months or so and have had no issues.

    * { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } there’s a polyfill for older ie as well: https://github.com/Schepp/box-sizing-polyfill

Leave a Reply

%d bloggers like this: