Site logo

Archived topic

Shadow for Block Element created with GenerateBlocks

5 replies · Started by Alexandra on November 2, 2020

Viewing posts 1–6 of 6

Hi there,

edit the Container Block and go to Settings > Advanced and in Additional CSS add:

box-shadow

Save that. And then add this CSS to your site:

.gb-container.box-shadow .gb-inside-container {
    box-shadow: 0 0.3rem 2.9rem 0 rgba(0,0,0, 0.1);
}

Hi, David!
Thank you so much for this!
It did not work with my first configuration of the block, because I had 2 inside containers, but I rebuilt the block with the image in a separate container and gave it a z-index of 1 and it worked! :D I'm so happy!
I left both blocks for now so you can see them here: https://alex.bandiwork.dev/2020/10/postare-test.html

Thank you so much!
Alexandra

Aah my CSS should have been this:

.gb-container.box-shadow > .gb-inside-container {
    box-shadow: 0 0.3rem 2.9rem 0 rgba(0,0,0, 0.1);
}

It was missing the direct descendent selector > which would apply only to the immediate inside container.

But even better that you removed the extra container.
And they look great!

Oh, that is awesome!
Great to know in case I might need that for other blocks :)
Thank you so much!

Glad to be of help!

This archived topic is closed to new replies.