width v/s max-width property in CSS

preview_player
Показать описание
Read here :

For setting a size of an element, we generally use CSS width property. But sometimes, width can create issues. So, here comes max-width.

✨ The max-width property defines the maximum width of an element.

If the content is larger than the maximum width, it will automatically change the height of the element.

If the content is smaller than the maximum width, the max-width property has no effect.

Thanks for Reading ☺️
.
.
.
.
#html #css #web #javascript #webdevelopment #developer #codenewbie #beginner #design #coding #programming #js #html5 #css3 #websites
#reels #reelsinstagram #csstricks
Рекомендации по теме
Комментарии
Автор

Oh, the difference is that the first one is not responsive, and the second one is?

Ruhan-fn
Автор

is it applicable for images @codewithtilak

likkisid