Box sizing | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Box sizing

Can any one explain this sentence fro me “Many browsers already use box-sizing:border box; for many form elements but not all which is why text areas look different at width 100%; “ Another question:i saw that box sizing include padding and borders in the width and height but what about margins how to include them??

19th Jul 2019, 12:41 PM
Majd Alkwaja
Majd Alkwaja - avatar
1 Answer
+ 14
border-box: The width and height properties include the padding and border, but not themargin. This is the box model used by IE when the document is in Quirks mode. padding-box : The width and height properties include the padding size, and do not include the border or margin (only in Firefox). Source: https://daker.me/2013/07/understanding-css3-box-sizing-property.html
19th Jul 2019, 1:35 PM
Zhenis Otarbay
Zhenis Otarbay - avatar