Archived topic
Caption background overlaying image not showing
3 replies · Started by Mark on July 1, 2022
Hi,
I am using GenerateBlocks to replicate an effect I achieved with Envira Gallery, which was to have the image caption sit on top of the image, with a semi-transparent background so the text can be read. I have set the caption top margin to negative 25, so it sits on top of the image, but when I do, the background disappears. When the margin is 0, the background is there, but below the image along with the text. I want the text AND background on top of the image. I have set up a demo page with an example of what I want to achieve, and then further down the effect/problem when I try to do this with generateblocks. Any suggestions would be really appreciated.
Thanks
Mark
Hi Mark,
Can you try add this CSS:
figcaption.gb-headline {
position: relative;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know :)
That worked perfectly. Thanks ever so much.
No problem :)