+ 3

Explain what this code {box-sizing: border-box;} does?

Expert please tell me the answer of this question please .... Preparing For Semester exam šŸ˜­

28th Feb 2022, 2:46 AM
Rashi Gautam[DM šŸš«āŒ]
Rashi Gautam[DM šŸš«āŒ] - avatar
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.
28th Feb 2022, 2:48 AM
SUJAN
SUJAN - avatar
+ 3
SUJAN PAUDEL(Less Active) can you explain more about this ā™„ļø Thank you ā¤ļø
28th Feb 2022, 2:56 AM
Rashi Gautam[DM šŸš«āŒ]
Rashi Gautam[DM šŸš«āŒ] - avatar
+ 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
1st Mar 2022, 9:52 PM
ShadowCipher
ShadowCipher - avatar