Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Color overlay on content image

  • I cannot seem to figure out how to have my page content have an image behind the color.
    I currently have the content color set to a color with some transparency.
    When I set a content image, it appears over the color. How can I make the color an overlay.

    The site I am working on is https://brucel94.sg-host.com/.

    Also is there a way to set the background image so that it does not scroll (fixed)

    Thanks

  • Hi there,

    Which image are you referring to? Are you using Generateblocks plugin?

    To fix the background image, try this CSS:

    @media(min-width: 1025px) { 
    body {
        background-attachment: fixed;
    }
    }

    However, it should only be applied to desktop, as tablet/mobile don’t support it well, I’ve made the code only appply to desktop.

  • Thanks for you reply.

    I’m just using the customizer for GeneratePress
    And I want to have a color overlay for the
    Colors –> Content Color and
    Content Background Images –> Content.

  • Hi there,

    I’m not sure which section you want to apply the color overlay to. Can you provide a screenshot for reference?

    I believe this will require custom CSS, as there’s no setting for it in the Customizer.

  • I want to do it globally in Content

  • I don’t quite get the idea. Any chance you can provide a mockup for better understanding?

  • Hi Ying,
    I am sorry I have not been able to find the right terms to describe what I want to accomplish.
    Please see this link. https://brucel94.sg-host.com/ for reference

    On this site, in the customizer, I have set background image –> content to be an image. In this case it is the interior of a store.

    I have also, in the customizer set Colors –> Content —> Background to be a partially transparent green. The idea is to have the transparent green be over the image to make the text more readable.

    So the problem is that the transparent color sits behind the image. I want it to be on top of the image.

    Thanks
    Bruce

  • You need to use this CSS to achieve the overlay color effect:

    .container#page {
        position: relative;
    }
    
    .container#page:before {
        content: "";
        position: absolute;
        inset: 0;
        background-color: rgba(77,112,68,0.9);
    }
  • Perfect! Thanks so much

  • You’re welcome!

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