CSS min-width, max-width, and width

Поделиться
HTML-код
  • Опубликовано: 9 сен 2024
  • This tutorial explains the differences between the min-width, max-width, width, min-height, max-height, and height properties in CSS.
    Code GIST: gist.github.co...

Комментарии • 75

  • @sharhanalhassan7352
    @sharhanalhassan7352 3 года назад +25

    Are you kidding me??? Just 2 minutes into the video and I understand why I've been struggling to eliminate unnecessary horizontal scroll bars. It took me almost a whole day searching for how to solve it and you just did it in the first two minutes. Thanks, man. Subscription is done!! What else can I do for you??

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  3 года назад +8

      Please share my videos to help others. :) Thanks.

    • @peterngacha
      @peterngacha Год назад +1

      @@SteveGriffith-Prof3ssorSt3v3 truly sir you helped me alot. I too will share

  • @ck0024
    @ck0024 5 лет назад +40

    *Now, I got it after 2 years of working without knowing it properly.*

  • @niwanthakaweragoda9480
    @niwanthakaweragoda9480 3 года назад +1

    Great Explanation!
    Really helped!
    Your voice is super clear too. I'm sure no one got confused about these things after watching this masterclass of an explanation.

  • @rockon7478
    @rockon7478 4 года назад

    got it after 6 months of working without knowing it properly.Sir you're a Wizard!!

  • @Anonymous-ht2bp
    @Anonymous-ht2bp Год назад

    Clear explanation,
    and got my doubts regarding widths cleared with a simple 5 min video 🎉

  • @miguelkalombo5512
    @miguelkalombo5512 6 месяцев назад

    Hey there. Brilliant video, and easy, clear explanation.
    THANK YOU!

  • @rohil3023
    @rohil3023 5 лет назад +1

    Thank you. you explained it better than any other youtube channel

  • @Cassandra81552
    @Cassandra81552 Год назад

    The best video explanation that I've ever seen, thanks a lot!

  • @Teeffein
    @Teeffein 3 дня назад

    Thank you so much brother for such an excellent explanations!

  • @SaveSoilOraganically
    @SaveSoilOraganically 3 года назад

    This tut made clear my doubts on max and min-width properties, good explanation.

  • @obinnaukoofe8626
    @obinnaukoofe8626 2 года назад

    Came back for a refresher!😁

  • @rinviventura5891
    @rinviventura5891 6 лет назад +2

    Thank you very much for this tutorial! I finally understood why my divs does not scale down in screen size.

  • @parikshitmusic510
    @parikshitmusic510 Год назад

    Just great ,beautiful explanation

  • @senseitei
    @senseitei 4 года назад +2

    Thank you, mate! Finally got how it works:)!
    Looking forward for more tutorials!

  • @azamataslidinov5513
    @azamataslidinov5513 Год назад

    Thank youu this solved so much of my problems

  • @reneyoo6111
    @reneyoo6111 2 года назад

    First time i understood max width thank you :)

  • @ilaanisdead
    @ilaanisdead 2 года назад

    Thanx for the detailed video

  • @vaidasmasys3764
    @vaidasmasys3764 5 лет назад +3

    Great stuff. Now few things in my projects makes a lot more sense :)

  • @mochammadivanrais8485
    @mochammadivanrais8485 3 года назад

    explain is clearly and easy to understand, thank you very much

  • @muhammadibrahimkhan4355
    @muhammadibrahimkhan4355 2 года назад

    thanks brother . Much appreciated

  • @toka8909
    @toka8909 3 года назад

    Thanks a lot for this video.

  • @Z3R0_U
    @Z3R0_U 3 года назад

    thank you very much you have a new subscriber

  • @artursurman7805
    @artursurman7805 3 года назад

    Great video Steve, straight to the point. Like!

  • @mrx-qi8th
    @mrx-qi8th 3 года назад

    nice man u explained it in the best possible way. just subscribed also.god bless u

  • @nvmffs
    @nvmffs 4 года назад +1

    So what's the most common use for those?

  • @mazmk
    @mazmk 3 года назад

    Finally i got it, thanks good sir

  • @hesamft
    @hesamft 2 года назад

    Thank you so much for this awesome tutorial

  • @damo190
    @damo190 3 года назад

    I saw from MDN, "max-width overrides width, but min-width overrides max-width. "
    But I saw this statement is always not true. I checked, when both min-width and max-width are mentioned,
    When max-width value is less than width value, then only max-width overrides width.
    When max-width value is less than min-width value, then only min-width overrides max-width.
    So, I am confused.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  3 года назад

      I have never used both max and min in the same style. I will use a width plus a max-width OR a width plus a min-width.
      In the rare cases where you want provide all three - a default, a max value, and a min value - then use the CSS clamp( ) method. ruclips.net/video/I0VU2Z_Y2KE/видео.html
      ruclips.net/video/6QwMvf1Jq0M/видео.html

  • @atultiwaree6023
    @atultiwaree6023 4 года назад

    nice way of teaching sir!

  • @nasa600
    @nasa600 2 года назад

    Thank you very much

  • @stranger4o4
    @stranger4o4 3 года назад

    thank you sir,
    this was very helpful.

  • @ronishlopchan2020
    @ronishlopchan2020 2 года назад

    Thanks a lot!

  • @rafhaellowixhomwad
    @rafhaellowixhomwad 2 года назад

    Thank you💚

  • @whytepencil3672
    @whytepencil3672 3 года назад

    Absolutely amazing! Thanks!

  • @d-landjs
    @d-landjs 2 года назад

    Amazing tutorial!

  • @shivarammuthukumaraswamy7164
    @shivarammuthukumaraswamy7164 4 года назад

    Thank you for this wonderful tutorial

  • @loveparmar1284
    @loveparmar1284 4 года назад

    thank you so much Sir.. concept cleared..

  • @piotrekjazz1287
    @piotrekjazz1287 2 года назад

    No info about what is a most often use case, block elements adjust width automatically

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  2 года назад

      There is no most often use case.
      Yes, block elements adjust width automatically, these properties allow you to limit that process.

    • @piotrekjazz1287
      @piotrekjazz1287 2 года назад

      @@SteveGriffith-Prof3ssorSt3v3 Thanks for response, the biggest use cases I know is max-width for elements you don't want to be to big, and min-height when you dont want your footer in the middle of the screen but at the bottom. Cheers

  • @boatmanbm
    @boatmanbm Год назад

    Waw, why didnt i learn this long ago.... im a nextjs dev currently building a chat system and this has answered all my questions. Thank u😊
    Is it ok to always use max-width? Im thinking of doing that now

  • @Tony.Nguyen137
    @Tony.Nguyen137 2 года назад

    Flex-basis and max-width is same right?

  • @lycan2494
    @lycan2494 5 лет назад

    lol after like a year i finally understand max-min. this video is perfectly explained.

  • @Omar-vz9el
    @Omar-vz9el 4 года назад

    Great explanation!

  • @tammyho2758
    @tammyho2758 3 года назад

    you are the bob ross of web development!

  • @abvgd1100
    @abvgd1100 4 года назад

    Thank you very much!

  • @corbettknoff5123
    @corbettknoff5123 3 года назад

    Great Videos!

  • @cap.blue-97sama99
    @cap.blue-97sama99 3 года назад

    Thanks a lot man!

  • @bskupdates1406
    @bskupdates1406 3 года назад

    can you give real use case example

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  3 года назад

      min and max width create bounds for your width. You can use them throughout your page for whatever you want. I use max-width on images and other media elements all the time.
      See here for more - ruclips.net/video/6QwMvf1Jq0M/видео.html

  • @abdullahbinabbas1706
    @abdullahbinabbas1706 3 года назад

    thank you so much :)

  • @JominJose
    @JominJose 3 года назад

    got it! thanks :)

  • @codedummydev
    @codedummydev 4 года назад +2

    my man has literally all the browsers, wtf lol

  • @zerosandones7547
    @zerosandones7547 2 года назад

    CONCISE!

  • @hashirattiyedath
    @hashirattiyedath 3 года назад

    thankz Brow

  • @fernandoarce804
    @fernandoarce804 4 года назад

    Great tuto (Y)

  • @daverattu8990
    @daverattu8990 4 года назад

    Thank youu!

  • @yuriikilyk8923
    @yuriikilyk8923 5 лет назад

    thank you)

  • @webb-developer
    @webb-developer Год назад

    check☑

  • @asadbekasqaraliev
    @asadbekasqaraliev 3 года назад

    20200 year covid-19

  • @renejacques8288
    @renejacques8288 3 месяца назад

    Blurry screen

  • @justspartak
    @justspartak 5 лет назад

    Thank you very much