DEV Community

CSS Grid or Flexbox in 2019

Nazim Zeeshan on May 12, 2019

Collapse
 
sally profile image
Sally

Both. They do different things.

Read some of Rachel Andrew's work, and blog posts on CSS Tricks. They will explain it in detail.

Collapse
 
nzee profile image
Nazim Zeeshan

Thanks Sally! Will read articles that you have suggested.

Collapse
 
deciduously profile image
Ben Lovy

Both! Just Flexbox for simple pages, and Flexbox inside Grid for more complex layouts

Collapse
 
nzee profile image
Nazim Zeeshan

Thanks, Ben!

Collapse
 
nzee profile image
Nazim Zeeshan

Which is your go-to choice for building layouts for your apps. Grid or Flexbox?

Collapse
 
nabbisen profile image
nabbisen

I'm moving from Flexbox to Grid, because I knew Grid is now partially supported in Internet Explorer 11...🙂
It requires -ms- vendor prefix:

Collapse
 
nzee profile image
Nazim Zeeshan

Thanks Heddi!

Collapse
 
christianotto profile image
Christian Otto

I prefer to use Flexbox on parts of the UI that basically stay the same in any scenario or have limited changes in different responsive behaviours, like for example interaction or input controls. There I usually see no need for using CSS Grid, which is what i tend to use more when it comes to the global (app) layout, that is, the app container, dashboards and the likes.

Collapse
 
natonathan profile image
Nathan Tamez

I use both. It all depends on the use case.

Collapse
 
nzee profile image
Nazim Zeeshan

Thanks Nathan!

Collapse
 
joel profile image
Joel Krause

Flex box for me. IE 11 support for Grid isn’t to crash hot so unfortunately we can’t use it on production sites.

Collapse
 
nzee profile image
Nazim Zeeshan

I see, thanks, Joel!