Display Three Blocks Side by Side with Float

Поделиться
HTML-код
  • Опубликовано: 16 ноя 2024

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

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

    This is one area I struggle to remember how to do - CONSTANTLY! Yours was the best tutorial I've seen to date, clear, concise and to the point!

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

    I like the way you explain things. So calmly but on point. Thank You.

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

    Well presented tutorial on floats; thank you. One question, when one uses floats, isn't good practice to clear the floats at end of the container div, in your case the "info_section div"? As I recall, there are number of methods and hacks for clearing floats. What is your preferred method?

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

      Yes, exactly. If the parent contains mostly or all floating children, a clear fix is often useful.
      I tend to put overflow: hidden on the parent. That allows the parent's height to adjust and accommodate the height of the floating blocks.
      If overflow: hidden causes some other issues (like with positioned elements), then I'll go to a clear: both on some element that follows the floating elements.