Glossary
Maximum width (max width)

Maximum width (max width)

The “max-width” CSS property defines an element’s maximum width in absolute terms (pixels) or relative terms (ems, rems, percentages, viewport-height, or viewport-width). Width properties in CSS ensure elements, such as images, text boxes, and other containers don't extend beyond a set width limit, preventing content from overflowing or cutting off.

Limiting an element’s horizontal width helps adapt responsive content to different devices, screen sizes, and orientations, improving site readability. It does not, however, affect assets smaller than an element's maximum width.

Here’s an example code snippet of a CSS “max-width” property:

p.ex1 {

  max-width: 300px;

}

The container restricts the width to a maximum of 300 pixels, ensuring that the element won’t exceed this limitation, maintaining a uniform size. 

Learn how to set sizing to any block-level CSS element and prevent overflow on your webpages. Visit Webflow University for additional lessons on margins, spacing, and padding to prevent overflow and improve webpage functionality.

Other glossary terms

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Hmm…we couldn’t find any results. Try a different search term or reset the filter.
Reset the filter
Load more