Interview Question

What is min-height and max-height?

min-height and max-height place lower and upper limits on height.

💡 Concept ✅ Quick Revision 🎨 CSS

Answer

min-height and max-height constrain an element’s used height. β€’ min-height provides a lower height limit. β€’ max-height provides an upper height limit and may require overflow handling. β€’ Logical min-block-size and max-block-size follow writing mode.

💡 Simple Example

.panel { min-height: 10rem; max-height: 70vh; overflow: auto; }

⚡ Quick Revision

min-height and max-height place lower and upper limits on height.