Recall & Review
beginner
What does the CSS
min() function do?The
min() function takes multiple values and uses the smallest one. It helps make layouts responsive by choosing the minimum size from given options.Click to reveal answer
beginner
How does the CSS
max() function work?The
max() function picks the largest value from the list of values you provide. It ensures elements don’t get smaller than a certain size.Click to reveal answer
beginner
Give an example of using
min() in CSS.Example:
width: min(50vw, 300px); means the width will be the smaller of 50% of the viewport width or 300 pixels.Click to reveal answer
intermediate
Why use
min() and max() instead of fixed sizes?They help create flexible layouts that adapt to screen size. This improves user experience on phones, tablets, and desktops.
Click to reveal answer
intermediate
Can
min() and max() accept different units?Yes! You can mix units like
px, em, vw, etc. The browser compares them and picks the smallest or largest value.Click to reveal answer
What will
width: min(100px, 50vw); do on a small screen?✗ Incorrect
The
min() function picks the smaller value. On a small screen, 50vw might be less than 100px, but usually 50vw is smaller, so width becomes 50vw.Which CSS function picks the largest value?
✗ Incorrect
max() picks the largest value from the list.Can
min() and max() be used together?✗ Incorrect
They can be combined, often inside
clamp() to create flexible ranges.What units can you use inside
min() and max()?✗ Incorrect
You can mix any CSS length units inside these functions.
Why are
min() and max() useful for responsive design?✗ Incorrect
They help elements adapt size between minimum and maximum values, improving responsiveness.
Explain how the CSS
min() function helps create responsive layouts.Think about how choosing the smallest size can keep things neat on small screens.
You got /4 concepts.
Describe a scenario where using
max() in CSS is helpful.Consider when text or buttons should not become too small.
You got /4 concepts.