CSS - max-width

About

The max-width property defines the maximum width of an element according to its parent element. The value is normally a percentage.

Example

div {
    background-color:blue;
    color:white;
    max-width:100px;
    padding:3rem;
}
<div>
Hallo
</div>

Documentation / Reference


Powered by ComboStrap