+ 3
Explain what this code {box-sizing: border-box;} does?
Expert please tell me the answer of this question please .... Preparing For Semester exam š
3 Answers
+ 4
The box-sizing property in CSS controls how the box model is handled for the element it applies to.
.module {
box-sizing: border-box;
}
One of the more common ways to use it is to apply it to all elements on the page, pseudo elements included:
*, *::before, *::after {
box-sizing: border-box;
}
This is often called āuniversal box-sizingā, and itās a good way to work! The (literal) width you set is the width you get, without having to perform mental math and manage the complexity that comes from widths that come from multiple properties.
+ 3
SUJAN PAUDEL(Less Active) can you explain more about this ā„ļø
Thank you ā¤ļø
+ 3
Rashi Gautam[Less Active]
With " box-sizing: border-box; " property, element's padding and borders are included within it's width and height. For instance you set item-width 50px, the border or padding will be included within 50px you set and not adding any pixels to the item.
https://code.sololearn.com/WuBX0peXz3Tt/?ref=app