DEV Community 👩‍💻👨‍💻

MoonLight
MoonLight

Posted on

box sizing Css Mosh

content box

div {
box-sizing: content-box;
width: 100%;
border: solid #5B6DCD 10px;
padding: 5px;
}
Enter fullscreen mode Exit fullscreen mode

Image description

border box

div {
box-sizing: border-box;
width: 100%;
border: solid #5B6DCD 10px;
padding: 5px;
}
Enter fullscreen mode Exit fullscreen mode

Image description

we should use these codes for ::before ::after
Image description

Top comments (0)

DEV

Thank you.

 
Thanks for visiting DEV, we’ve worked really hard to cultivate this great community and would love to have you join us. If you’d like to create an account, you can sign up here.