CSS: min() max()
What is min() max()
The CSS min() function is a math function that takes two or more comma-separated values and returns the smallest value from the list.
For example, width: min(100%, 600px)
max() returns the biggest value from the list.
browser support
supported by all major browsers since 2021.
CSS. width related.
- CSS: Layout. Index
- CSS: Font based units: rem rcap rch rex ric
- CSS: Viewport based units: vw vh vmin vmax vi vb
- CSS: Percentage value
- CSS: @container query
- CSS: min-width max-width, min-height max-height
- CSS: min-content, max-content
- CSS: fit-content (shrink wrap)
- CSS: clamp()
- CSS: min() max()
- CSS: calc()