The Importance of Box Sizing with CSS

Chris wrote about this back in 2010 but it is something I just recently discovered while doing a Backbone.js tutorial by Jeffrey Way.

“The box-sizing CSS property is used to alter the default CSS box model used to calculate widths and heights of elements. It is possible to use this property to emulate the behavior of browsers that do not correctly support the CSS box model specification.”(reference)

Here is the skinn

[cc lang=”css”]
textarea {
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */

Leave a Reply

Your email address will not be published. Required fields are marked *