DEV Community

Discussion on: My favourite line of CSS

Collapse
 
dillonheadley profile image
Dillon Headley

Doesn’t justify-items and/or justify-content : center help with the last line thing?

Collapse
 
thedamon profile image
Damon Muma

They would in a flex layout I think! Within grid, those properties seem to align the items/content within their existing row or column, but not affect the placement of the items themselves.. in a way it makes sense, though, since a grid is.. well, a grid—so the columns and rows are continuous throughout the entire grid

Collapse
 
dillonheadley profile image
Dillon Headley

Ah yes you are right. I have come across similar situations where what I need is some kind of blend of flex and grid

Thread Thread
 
thedamon profile image
Damon Muma

Yeah often what feels like grid ends up being better off flex. I might mess around A bit and see what the closest flex version of this I can come up with