Page 1 of 1

Padding or Margin inside Layout Grids

Posted: Wed Feb 22, 2023 5:48 am
by lpug
I think I know the answer to this but I'll ask anyway just incase I'm missing something.

I have a layout grid with 2 cells, within each cell I have set a background image and set it to cover (so it covers whole cell) I did this with the other cell as well. When I preview its as expected 2 images side by side in the layout grid. Is there anyway to add padding betwen the images? when they are set to cover?

Reason for this process is that I want to overlay text, if I place it in the cell as an images then I cannot overlay any text.

Thanks

Re: Padding or Margin inside Layout Grids

Posted: Wed Feb 22, 2023 7:05 am
by Pablo
A background image will always fill the entire column, it is not affected by padding or margin.
If you want to add spacing then you can add a nested grid.
Or use a flex grid instead. In a flex grids you can set gaps between columns.

Re: Padding or Margin inside Layout Grids

Posted: Wed Feb 22, 2023 9:54 am
by lpug
As usual thanks Pablo, just for my information I thought nested grids is not good practice?

Re: Padding or Margin inside Layout Grids

Posted: Wed Feb 22, 2023 10:32 am
by Pablo
It will add extra code to the page, but it works.