min-height और max-height प्रॉपर्टीज
min-height और max-height प्रॉपर्टीज का उपयोग किसी एलिमेंट की न्यूनतम और अधिकतम ऊंचाई सीमित करने के लिए किया जाता है। यह रिस्पॉन्सिव डिजाइन में कंटेंट ओवरफ्लो को नियंत्रित करने के लिए उपयोगी है।
उदाहरण
<!DOCTYPE html>
<html>
<head>
<style>
div {
max-height: 550px;
min-height: 450px;
background-color: red;
}
</style>
</head>
<body>
<p>Below is a div with maximum and minimum height. Resize the web browser to see the effect.</p>
<div>This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text.</div>
</body>
</html>
व्यवहार: यदि कंटेंट min-height से कम है, तो एलिमेंट कम से कम उतना ऊंचा रहेगा। यदि कंटेंट max-height से अधिक है, तो ओवरफ्लो व्यवहार (overflow प्रॉपर्टी) लागू होगा।