Box sizing | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Resposta
+ 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