CSS Float and Clear Properties

Поділитися
Вставка
  • Опубліковано 9 лют 2025
  • When you want text to wrap around something in the browser then you need to understand how the CSS float and clear properties work.
    This video covers all the fundamentals of how float and clear work together and how you can continue to have backgrounds and borders wrap around your floated elements.
    Code GIST: gist.github.co...

КОМЕНТАРІ • 112

  • @mergeconflict1496
    @mergeconflict1496 24 дні тому

    Thanks for the clear explanation, you earned one subscriber today

  • @andreflrsc
    @andreflrsc 4 роки тому +7

    WHAT AN EXPLANATION! This channel is just awesome! You explain the WHY when most of the UA-camrs stay on the HOW. Thank you! I will start watching your videos from now on.

  • @sabbir4587
    @sabbir4587 4 роки тому +9

    I think this is one of the most underrated channel for web development on youtube because this guy deserves more subscribers and views.reason could be what? just because he doesn't say to subscribe to his channel?

  • @brandonburks4451
    @brandonburks4451 6 років тому +6

    I enjoyed how you went through some troubleshooting steps while explaining the code. It's very useful.

  • @akhtar04
    @akhtar04 6 місяців тому

    Thanks for uploading this video. Your clear explanation of the CSS clear property helped me finally understand it!

  • @azmisudrajat
    @azmisudrajat 4 роки тому +1

    Steve's CSS series is the best css course i've watched during this pandemic. Thanks.... no, million thanks actually

  • @youssifganni
    @youssifganni 2 роки тому +2

    Well spoken, clear, concise, explains every detail! This is exactly what I need 👌Subbed

  • @jamyjamy5403
    @jamyjamy5403 3 роки тому

    Bro fr, u are the best, in explaining this things about websites, bro congratulations u made it ur the best, I really like your style

  • @kieranchamberlain9833
    @kieranchamberlain9833 2 роки тому

    Super clear! Explained everything well without presuming prior knowledge. Thank you!

  • @laureanealcantara7298
    @laureanealcantara7298 Рік тому

    You're a great Professor! I'm so glad I found your channel.

  • @digigoliath
    @digigoliath 5 років тому +2

    Thanks for an enjoyable tutorial on the concept & implementation of FLOAT. The tip on overflow:auto is a great bonus.

  • @sarahj3438
    @sarahj3438 5 років тому +15

    Thank you ! Your explanations are easy to grasp :) Very clear and makes css a less stressful subject 👍🏼

  • @ismaildad9727
    @ismaildad9727 4 роки тому

    far more helpful than the other videos I watched on the topic. Im now a subscriber!

  • @patientson
    @patientson 4 роки тому +1

    Many great overdue thanks to your family and friends. Thank you very very much. Thank you very much.

  • @vinodliyanage4128
    @vinodliyanage4128 4 роки тому +2

    Wow❤️🔥
    this channel should have more subcribers than that.ur contents are so pure and clear.even your voice is so likeable.im so lucky to find your channel.
    Keep it up man👏
    Good luck😍

  • @Willjrba
    @Willjrba 3 роки тому

    Pretty clear and straight forward explanation on floating property. Congrats @Steve, it helped me a lot!

  • @successfulbrothers6741
    @successfulbrothers6741 4 роки тому +4

    thank you, i now have a proper knowledge about the clear and float property

  • @farazk9729
    @farazk9729 3 роки тому

    Thank you so much; my wife and I just watched the video and loved the teaching! very useful and learner-oriented! Killer voice BTW!

  • @arunaveerappan4749
    @arunaveerappan4749 4 роки тому +1

    After going through bunch of your videos, I guess your favorite color must be gold :p . Great videos. Love them :)

  • @vidyasagar7531
    @vidyasagar7531 3 роки тому

    Thank you... I have been stressing over this topic for 2 days.. thanks to you.. I'm able to understand it.....

  • @hirutassefagebrekidan41
    @hirutassefagebrekidan41 3 роки тому +1

    I really like your lessons, very clear and easy to understand, thanks a lot for your contribution 🙏🙏🙏🙏

  • @mitchtembo487
    @mitchtembo487 3 роки тому

    Like the way you explain. You keep everything simple and it's easy to follow up.

  • @ThePearl178
    @ThePearl178 4 роки тому +2

    Thank you for making it simple. Great Work

  • @josephmendes2534
    @josephmendes2534 Рік тому

    I'm gonna follow you for the rest of my development journey

  • @enablepk6404
    @enablepk6404 4 роки тому

    Much better than other videos, keep going!

  • @BhupinderSingh-qd6he
    @BhupinderSingh-qd6he 4 роки тому

    Quick to the point, Soft voice and super explanation. Super subscribe and like!!

  • @robertartwohl
    @robertartwohl 3 роки тому

    Thanks!

    • @robertartwohl
      @robertartwohl 3 роки тому

      Learning CSS. This is the best instruction I've come across paid or free. Thanks for your efforts, much appreciated!

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  3 роки тому

      Thanks very much Robert!

  • @ohabkraby7774
    @ohabkraby7774 2 роки тому

    You have your explanation way really I like it most

  • @markzait2750
    @markzait2750 2 роки тому

    Very useful video. Very good explanation. Thank you!

  • @3LOKBaba
    @3LOKBaba 4 роки тому +1

    Thanks for the clear explanation!

  • @techrelated4
    @techrelated4 4 місяці тому

    Thank you so much i had hard time understanding this 2 concepts.

  • @mark_tillman
    @mark_tillman Рік тому

    Clear explanation. Awesome.

  • @mohammadraihangazi
    @mohammadraihangazi 3 місяці тому

    Ohh you're brilliant man, i got help from a 6 years old video.

  • @vedinak7360
    @vedinak7360 2 роки тому

    Thank you for a great explanation!

  • @zubairmuhammadjamiu4344
    @zubairmuhammadjamiu4344 2 роки тому

    Thanks for making this simple.

  • @OGbigdaddom
    @OGbigdaddom 11 місяців тому

    Thank you very much. very useful and concise!

  • @BradleyKisia
    @BradleyKisia 4 роки тому

    This was very well done and explained. Thank you.

  • @ayelamadhuri9635
    @ayelamadhuri9635 2 роки тому

    thank you very much steve....you made things easy

  • @yonas2070
    @yonas2070 3 роки тому

    Thank you, this is the thing I exactly wanted to know

  • @samyuktharamesh5968
    @samyuktharamesh5968 3 роки тому

    Great video! Thanks for the clear explanation

  • @samratgc6987
    @samratgc6987 4 роки тому

    That felt easy
    Thank you
    You absolutely rock with the explanation.

  • @luminousworks.studio
    @luminousworks.studio 5 років тому +3

    Nice work!!

  • @leox4224
    @leox4224 3 роки тому

    Clear: left -> drop below elements floated to the left.
    Clear: right -> drop below elements floated to the right.

  • @lewiduressa
    @lewiduressa Рік тому

    Great explanation!

  • @stansmith9565
    @stansmith9565 Рік тому

    at 07:39 you do "clear: right", which is applied for the paragraph. My question here is, why does the image for the third p moves down as well, even though the clear attribute was only set for the paragraph?

  • @lulusaikou221
    @lulusaikou221 2 роки тому

    Thank you St3v3! It's really helpful to me.❤

  • @hotnspicebyemti
    @hotnspicebyemti 3 роки тому

    wow!!! it was re4ally helpful... thank you so much

  • @lunaRdeltaY
    @lunaRdeltaY 3 роки тому

    great explained! thx bro!

  • @vipinsharma-zx9cb
    @vipinsharma-zx9cb 4 роки тому +1

    Float and clear are one of the confusion topics of CSS, there are different senerios in which they behave differently, like for example if two consecutive images are floated left or right will pile up one after the another .. and when we use clear=both on them , then they will pile up on top of each other. Also please make one video on Floats / overflow=auto effects on page layout (with div's) its completely different.

  • @manikuttan4975
    @manikuttan4975 4 роки тому +1

    Good job 👍

  • @icscomputer
    @icscomputer 4 роки тому +2

    Thanks God, someone finally cleared these concepts to me. The one dislike is from a person who wanted to be a web developer but could not learn beyond Tags.... . The UA-cam is filled with garbage, people like you are hidden gems and they are quite hard to find.

  • @Aminulbd1
    @Aminulbd1 5 років тому +2

    Nice Tutorial.

  • @abguven
    @abguven 4 роки тому

    Very clear explanation, thanks a lot.I just didn't understand something.When you set clear property to "both" on third paragraph why the paragraph didn't go under the image?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  4 роки тому

      The third paragraph does render below the image from paragraph two with the clear values `right` or `both`. It will not change the side it is on. If I want to move it under the other image then I need to use float:right; in addition to the clear property.

  • @BradleyKisia
    @BradleyKisia 4 роки тому

    Could you provide the links to the images and the css file referred to in the tutorial. Thanks however; was really useful.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  4 роки тому

      In the description is the link to the HTML file with the CSS that I changed in the tutorial. The other file was just a few lines of basic CSS for fonts. I don't have the images or the CSS anymore.

  • @noeelreeds
    @noeelreeds 11 місяців тому

    Thank you for this!

  • @ovoono9708
    @ovoono9708 4 роки тому +1

    I was always wondering what is :auto....now I get it ;)

  • @TheAmeer3881
    @TheAmeer3881 4 роки тому +2

    Nice job

  • @sameerisonvacation
    @sameerisonvacation 3 роки тому

    Aww! 😍 Awesome, Man

  • @lipangbenjoy8759
    @lipangbenjoy8759 6 місяців тому

    Thinks sir big help in self improvement

  • @emanuelrouse7076
    @emanuelrouse7076 6 років тому +1

    Would like to work with the file you give, I've cloned the index.html. I like to work with the same assets as the instructor. Do you have a link to the deadpool image you're using?

  • @Turjak_art
    @Turjak_art 3 роки тому

    Thank you helped me a lot

  • @gsantos7622
    @gsantos7622 2 роки тому

    Amazing video! I do have a question tho.. How do you make it so your webpage updates automatically as you code?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  2 роки тому

      In VSCode it is the Live Server extension. It runs a node web server and uses web sockets to talk with the page and pass updates and they happen

  • @harishg9429
    @harishg9429 2 роки тому

    Thank you Steve

  • @ramalsrougi
    @ramalsrougi 3 роки тому

    Thank you so much 😍❤❤❤

  • @mostafahassan5366
    @mostafahassan5366 4 роки тому

    thank you , its good and easy.

  • @artembublik108
    @artembublik108 9 місяців тому

    thank you , very good video !!!!!!!!!!!

  • @kurtthorsten4463
    @kurtthorsten4463 2 роки тому

    great video, thank you

  • @keithsorrels6903
    @keithsorrels6903 11 місяців тому

    Great Explanation, I even understood it. 😂. I would like to know how to have a single line of text that is centered on the image that is floated. Thanks.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  11 місяців тому

      You can't float anything to the center. Floating means moving it to the left or right and changing how things move around it.

    • @keithsorrels6903
      @keithsorrels6903 11 місяців тому

      @@SteveGriffith-Prof3ssorSt3v3 I think my question was not too clear. The image has a mid point on the side, half way up from the bottom of the image. A single line of text (normally) would be aligned with the top part of the image, I would like to move the text down so it is centered on the image. By the way, so appreciate the lesson and speedy reply.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  11 місяців тому

      @keithsorrels6903 the css vertical-align property controls how and image aligns with the text on the line that it sits inside of. Again though, with float that no longer applies. The image is not part of the line anymore.

    • @keithsorrels6903
      @keithsorrels6903 11 місяців тому

      @@SteveGriffith-Prof3ssorSt3v3Thanks a lot!

  • @gevorgmartirosyan8189
    @gevorgmartirosyan8189 2 роки тому

    what if in .three we remove "clear:both;" and on .one we leave overflow auto. Wont it work?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  2 роки тому

      Try it. The best way to learn and make sure that you understand is to experiment and see if things behave the way you expect them to.

  • @Rasmusorum
    @Rasmusorum 2 роки тому

    Thanks, what about inherit property in clear?

  • @dusan9930
    @dusan9930 6 років тому +2

    What about clearfix hack? Can you explain it? Thanks in advance.

  • @ЖахонгирУмаров-у4о

    Thank you Bro!

  • @Ella_1994
    @Ella_1994 10 місяців тому

    JUST Perfecto!

  • @hardinrami8500
    @hardinrami8500 27 днів тому

    than you so much man!

  • @acedluffy5
    @acedluffy5 4 роки тому

    very good video

  • @jetepardonne2480
    @jetepardonne2480 4 роки тому +2

    thankyou

  • @nysmulerecords4465
    @nysmulerecords4465 3 роки тому

    useful, thank bro

  • @izzylin2728
    @izzylin2728 8 місяців тому

    bless you sir

  • @AK-my9sb
    @AK-my9sb Рік тому

    What happens if u use height instead of overflow?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Рік тому

      Height doesn't stop anything with floating. It would cause more problems by forcing an element to be a specific height

  • @yarik83men51
    @yarik83men51 5 років тому +2

    Thx

  • @m.a3968
    @m.a3968 3 роки тому

    The perfect thank you

  • @BelladoniusMonk
    @BelladoniusMonk 2 роки тому

    u r dope. ❤❤❤

  • @djsamiir4025
    @djsamiir4025 5 років тому +3

    thank you k

  • @tawsifrahman0
    @tawsifrahman0 3 роки тому

    Thanks a lot

  • @fireball1433
    @fireball1433 2 роки тому

    Thankyou ..

  • @md.tanjilurrahman5949
    @md.tanjilurrahman5949 2 роки тому

    ❤️

  • @Peywan
    @Peywan Рік тому

    super!

  • @OmarMartinez-ns1ey
    @OmarMartinez-ns1ey 2 роки тому

    I like your video but you did not touch the clear property.

  • @afolabijosh2431
    @afolabijosh2431 3 роки тому

    Hello

  • @ancestraljo
    @ancestraljo 3 місяці тому

    Great explanation!