max()
noun
say it: “MAKS” /mæks/
A CSS function that uses the largest of the values you give it, often to set a size that can grow but never drop below a floor.
What does max() do in CSS?
max() uses the largest of several values, so an element never gets smaller than one of them.
.sidebar { width: max(200px, 20%); }
In a sentence
- “I set the padding to max() of 1rem and 5%, so it grows on big screens but never gets thinner than 1rem.”
Level: Freelancer · More CSS terms at this level
Updated