Open this example in the interactive library
Source code
<style>
.demo {
width: min(100%, 20rem);
}
</style>
<div class="demo">Fluid width with a maximum</div>
Fluid width with a maximum with native CSS. The preview includes a small shared demo stylesheet.
Open this example in the interactive library
<style>
.demo {
width: min(100%, 20rem);
}
</style>
<div class="demo">Fluid width with a maximum</div>