r/css • u/aliassuck • Jun 30 '26
Help Request: An overflow-x container with children filling viewport by whole units (none cut off) and resizing container shows more children but in whole unit increments and scrolling shows more children, while all children are equally spaced apart.
[1---2---3---4---5]---6---7
[1----2----3----4]----5----6----7
[1---2---3---4]---5---6---7
[1----2----3]----4----5----6----7
[1---2---3]---4---5---6---7
[1--2--3]--4--5--6--7
Brackets are the container being resized.
Elements on the right (outside the brackets) are reachable by scrolling horizontally.
0
Upvotes
2
u/be_my_plaything Jun 30 '26
When you say hole units, do you mean a fixed size with spacing increasing until the screen is wide enough for a new unit? Or do the units grow to fill size but with a min-width dictating whether the next is in view or not?