I’m retrieving items from a database and displaying them on a page. Therefore sometimes I’ll have 3 and other times, 7,8,9,10 and so on.
My main page container is a grid with 3 columns, first and third columns have a width of 100px the middle is auto.
Im placing my content in the middle column. Each item has a image and a title.
ive tried using ul and li and also flexbox with margins.
my issue is I need spacing between each item.
with margin I end up with spacing between the edge of my container and first item or on the right.
given I don’t know how many items will be on each row I can’t remove margins on nth item.
maybe a grid with grid gap is a option?
how can I create new automatic rows etc