CSS - max-width

Boxdim

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





Discover More
CSS - Responsive (Breakpoint)

responsiveness in CSS An element that defined the width: as percentage or fix with a max-width property in percentage generally equal or below 100% Example: Bootstrap use media queries to create...
Boxdim
CSS - Width property (of a box)

The width property specifies the width of boxes and it's calculation is defined by the box sizing property. HTMLCSS HTML width attributeHTMLimgiframe... If you want to set a width on a p element for...
Css Horizontal Alignement Result
CSS Block - Align (Left, Center, Right)

How to align a visual element with a block display horizontal positioning article You can align visual element on two level: on the box level: the box is aligned on the text level: the text in the...



Share this page:
Follow us:
Task Runner