आज इस आर्टिकल में हम आपको CSS Height & Width Tutorial in Hindi – Part 8 के बारे में बता रहे है. CSS official Website
Height और Width property का इस्तेमाल किसी भी element की height और width सेट करने के लिए किया जाता है. इसकी value हम px, cm, mm, % में रख सकते है. Height और Width property में margin, padding और border सम्मलित नही होता है. यह एक element के width और height को सेट करते है और इसके बाद padding, border और margin अपना काम करते है.
Example – CSS Height & Width Tutorial in Hindi – Part 8
div{
width:100px;
height:100px;
background-color:red;
}
![CSS Height & Width](https://hindialerts.com/wp-content/uploads/2018/05/CSS-Height-Width-.png)
max-width
Setting
इसका इस्तेमाल किसी element की max width सेट करने के लिए किया जाता है. इसका मतलब है की किसी भी element की max-width आपके सेट की गयी value होगी और screen के की width कम करने पर यह कम हो जायेगी लेकिन max-width से ज्यादा बड़ी नहीं होगी. यह width property को override भी करती है.
Example
div {
max-width: 500px;
height: 200px;
background-color: blue;
}
Output>>>>
![Max width](https://hindialerts.com/wp-content/uploads/2018/05/Max-Height.png)
![Max width with browser resized](https://hindialerts.com/wp-content/uploads/2018/05/Max-width-with-browser-resized.png)
CSS Box Model Tutorial in Hindi – Part 9>>>>>>>>>>>>>
इसे भी पढ़े – Pendrive Bootable कैसे बनाए?