I'm trying to create a horizontally scrolling widget. Much like an image carousel but with text and icons instead.
It will have multiple columns, but only one will be visible at any one time. The rest will have overflow: hidden
.
In order to make the columns equal size, I'm looking at css-grid. For example, this makes 3 equal width columns:
display: grid;
grid-auto-columns: 1fr;
grid-auto-flow:column;
However, I wondered if there was a way to constrain the grid itself, to one column wide. so the grid would be one column wide and each column would of course be one column wide.
The result being on a 3 column layout, that 2 columns overflowed and they could be hidden.
Not sure whether this is possible without setting a "px" width on the grid itself.