Kevin Powell - CommunityKP-C
Kevin Powell - Community12mo ago
39 replies
Nick

CSS grid that's constrained vertically

Finding it pretty difficult to recreate this pattern tbh

Each image needs a fixed aspect ratio (easy enough), but as the grid grows the content should be constrained by the grid height and overflow/grow horizontally if it needs to.

Problem I've currently got is how the horizontal space is distributed between columns rn (2nd image)

Is this possible?

https://codepen.io/nwoodward/pen/MYgMKgX?editors=1010
noob-css-grid-question-v0-28r9xoawxahe1.png
Was this page helpful?