99% web-devs don't know how to solve this layout problem.

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

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

  • @haisekurayami
    @haisekurayami 6 месяцев назад +4

    you only need to write object fit cover on the image instead of the container...

    • @MishaLestev
      @MishaLestev  6 месяцев назад +1

      Pardon me, isn't it already 'object-fit: cover', take a look at class '.block' on 3:05

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

      @@MishaLestev probably a specificity problem here, I do a tons of cards in my designs and object fit cover always works

  • @baraahalabi
    @baraahalabi 6 месяцев назад +1

    I usually solve this issue by either making a parent div and setting overflow hidden on it, or by using background image in css.
    Nice to know why this happens tho, Thanks for sharing!