CSS: Box Sizing

Chris Coyier erklärt Box Sizing.

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+ * /
}

The border-box value (as opposed to the content-box default) makes the final rendered box the declared width, and any border and padding cut inside the box.

Possibly related posts (automatically generated)