I display an entity reference field that holds 4 images (media items). By default they are displayed in 4 rows one below the other. I want to display them side by side. Olivero is the theme I am using.
If I set .grid-full
to the parent element, then indeed the 4 images are arranged in columns. However, they only occupy 1 column each out of the 14 columns of the grid.
It seems I have to add something like grid-column: 1 / 3;
to each image but the number of images is dynamic (can be 4 or more) therefore I cannot know the values beforehand. Let alone that I cannot select the elements individually in CSS as they don’t have unique IDs.
The same scenario is really simple with Bootstrap. Assigning just col-sm
would have done the trick.
I wonder if there is a solution to my issue and why in Olivero it is required to explicitly specify the span of each column.