min-width और max-width प्रॉपर्टीज
min-width और max-width प्रॉपर्टीज का उपयोग किसी एलिमेंट की न्यूनतम और अधिकतम चौड़ाई सीमित करने के लिए किया जाता है। यह फ्लूइड लेआउट्स में एलिमेंट को बहुत संकरा या बहुत चौड़ा होने से रोकता है।
उदाहरण
<!DOCTYPE html>
<html>
<head>
<style>
div {
max-width: 300px;
min-width: 100px;
background-color: red;
}
</style>
</head>
<body>
<p>Below is a div with maximum and minimum width. 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>
उपयोग: रिस्पॉन्सिव कंटेनर्स के लिए width: 100%; max-width: 1200px; जैसा पैटर्न आम है।