5. min width and max width - Responsive CSS Tutorial

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


When starting to think responsively, setting a max-width on an element can be very useful. Often we want a layout to be able to shrink down very small, but we want to limit the maximum size of elements to prevent line-lengths from getting to long and the layout from becoming awkward.

The properties
Both of these will prevent an element from either getting bigger or smaller than the sizes given, despite whatever might be set on the width property.

min-width - the minimum possible size an element can be
max-width - the maximum possible size an element can be
Рекомендации по теме
Комментарии
Автор

after thousands of videos on this topic this was reaaally helpful and I wish you my best, dude.

tengotsertsvadze
Автор

Your teaching is simple and easy to understand for me. I like it. Thank you 👍

beatzoid
Автор

As a beginner in CSS, I wind this really helpful. Huge thanks to Kevin and Scrimba!

iamtharunraj
Автор

Really quick and simple explanation.
Thank You!

Zen-lzhc
Автор

Very helpful. I was looking for it everywhere. Thanks to this tutorial I caught the gist. Thanks so much. Greetings from PERU, bro;

derickblacido
Автор

I saw from MDN, "max-width overrides width, but min-width overrides max-width. "
But I checked one example it's not true always. So, I am confused what this sentence means.

damo
Автор

thank you very much, simple explanation.

andi-dpo
Автор

Hello, l’m wondering why the max-width is set for 620px? Does it come with some specific reason? Thanks

katewang
Автор

Hard to see mode and code color same same😶

bharatchavhan
Автор

this was very helpful thank you so much man <3

boizman
visit shbcf.ru