Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS A simple layout component: flex or grid?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #284766
    joaosaro
    Participant

    So, I want to do a simple component with a one direction layout. What should I use: Flexbox or CSS Grid? Why?
    Is just a preference or there are pros and cons?

    Check this super simple example: https://codepen.io/joaosaro/pen/rRJXOa
    A container with 3 children: two divs occupying only the content size and one that expands itself the maximium space possible.

    #284767
    uxfed
    Participant

    Both tools will work, but personally I lean towards flexbox because it has better support in IE11 (if you still care about IE11 support).

    #284778
    joaosaro
    Participant

    I forgot to mention: if there is no browser support issues.

    My doubt is if there is anyone that found any technical advantage from one to the other. Or is just a question of readibility or approach (1D vs 2D)

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.