Grid or Flex when building Sponsor Page

I'm building a sponsor logo page for a website and I'm not sure if using grid or flex would be better? Part of me feels like grid would be more robust, but would be more work when additional sponsors are added - image is from last year's conference, so right now I only have half the sponsors due to being a few months out.
No description
7 Replies
Chris Bolson
Chris Bolson4mo ago
I would have thought that flex was the best option here.
JonathanH
JonathanHOP4mo ago
That's what I'm thinking. I was getting ready to make it a display grid and then had second thoughts.
13eck
13eck4mo ago
For a sponsor page? 100% grid. That way you know no sponsor logo is going to be bigger than the others. Heck, do you even need either one? Just inline the images with a sane max-width and be done with it.
JonathanH
JonathanHOP4mo ago
Inline, max width with a gap, that sounds super easy. They will each be sectioned out by sponsor level to control the logo widths and adjusted manually as needed - some sponsor logos always need tweaks even in WordPress sites.
13eck
13eck4mo ago
img {
display: inline-block;
max-width: 100%;
}

img + img {
margin-inline-start: 1em;
}
img {
display: inline-block;
max-width: 100%;
}

img + img {
margin-inline-start: 1em;
}
And you're about 80% done :p
Milo
Milo4mo ago
Woah ive never seen margin-inline-start before, and what is that + selector? Is it for imgs that have img siblings?
13eck
13eck4mo ago
margin-inline-start is a logical property that’s the same as margin-left for English, but margin-right for Hebrew or other RTL language. And the double image selector says, “any image that has a prior sibling image”. It’s selecting all images except the first so there’s a left margin on them but not a wonky margin on the first image

Did you find this page helpful?