Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
May 21, 2020 07:57 pm GMT

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:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks