Site logo

[Resolved] Shadow for Block Element created with GenerateBlocks

Home Forums Support [Resolved] Shadow for Block Element created with GenerateBlocks

Home Forums Support Shadow for Block Element created with GenerateBlocks

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1514368
    Alexandra

    Hi there!
    I’ve created a Block Element using GenerateBlocks that I’ve hooked at the end of all my posts as an Author Block.
    You can see it here: https://alex.bandiwork.dev/2020/10/postare-test.html

    Can you please tell me how I could give a shadow to the grey container and the round image?
    I would like it to look like the Author box here: https://sitkatheme.com/lifestyle/2019/10/03/our-favorite-airbnbs-on-a-budget/

    Thank you!

    #1514806
    David
    Staff
    Customer Support

    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);
    }
    #1515609
    Alexandra

    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! 😀 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

    #1515873
    David
    Staff
    Customer Support

    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!

    #1515903
    Alexandra

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

    #1516000
    David
    Staff
    Customer Support

    Glad to be of help!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.