Open this example in the interactive library
Source code
<style>
.demo {
box-sizing: border-box;
width: 12rem;
padding: 1rem;
border: 4px solid teal;
}
</style>
<div class="demo">Border-box sizing</div>
Border-box sizing with native CSS. The preview includes a small shared demo stylesheet.
Open this example in the interactive library
<style>
.demo {
box-sizing: border-box;
width: 12rem;
padding: 1rem;
border: 4px solid teal;
}
</style>
<div class="demo">Border-box sizing</div>