Intro to CSS Grid

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ต.ค. 2024

ความคิดเห็น • 8

  • @meatyout
    @meatyout 5 ปีที่แล้ว +2

    Thanks for this very useful tutorial, Steve!
    I'm brand new to this so my question may be stupid... Why do you use flex instead of grid's justify-items | align-items | place-items here?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  5 ปีที่แล้ว +1

      You definitely could. I was just showing my students that they could combine Flex with Grids because they had previously learned Flex.

    • @meatyout
      @meatyout 5 ปีที่แล้ว

      @@SteveGriffith-Prof3ssorSt3v3 Thanks for your swift reply, Steve. I've played a bit with your code and noticed that the result is not exactly the same: with flex, the background of the paragraph stretches to fill the entire grid item, which is not the case when using grid's "place-items", for example. (I'm writing this for other readers, not for you... ;) )

  • @frenchfry5675
    @frenchfry5675 2 ปีที่แล้ว

    For the most part, does grid and flex replace or reduce usage of properties like position / float / clear or does it just depend on the situation and what might one of those situations be ?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  2 ปีที่แล้ว +1

      position and float are still used - for the original things that they were intended for. Grid and Flex are now the primary approaches for creating layout.

    • @frenchfry5675
      @frenchfry5675 2 ปีที่แล้ว

      @@SteveGriffith-Prof3ssorSt3v3 thank you for the clarification !