May 21, 2020 07:57 pm GMT
Original Link: https://css-tricks.com/flexbox-like-just-put-elements-in-a-row-with-css-grid/
Flexbox-like just put elements in a row with CSS grid
It occurred to me while we were talking about flexbox and gap
that one reason we sometimes reach for flexbox is to chuck some boxes in a row and space them out a little.
My brain still reaches for flexbox in that situation, and with gap
, it probably will continue to do so. It’s worth noting though that grid can do the same thing in its own special way.
Like this:
.grid { display: grid; gap: 1rem; grid-auto-flow: column;
… Read article “Flexbox-like “just put elements in a row” with CSS grid”
The post Flexbox-like “just put elements in a row” with CSS grid appeared first on CSS-Tricks.
Original Link: https://css-tricks.com/flexbox-like-just-put-elements-in-a-row-with-css-grid/
Share this article:
Tweet
View Full Article