Site logo

[Support request] Setting the gradient of page-hero backround-image overlay

Home Forums Support [Support request] Setting the gradient of page-hero backround-image overlay

Home Forums Support Setting the gradient of page-hero backround-image overlay

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1806135
    Ben

    Hi,
    In elements > headers, I can see the option to select a “Background Overlay”, and a corresponding “Background Color”. I then notice that this outputs a background-image gradient, eg:
    background-image: linear-gradient(0deg, rgba(211,211,210,0.1),rgba(211,211,210,0.1))
    against class “.page-hero”

    Is it possible to use a gradient with 2 values, or modify the gradient further, eg to
    linear-gradient(-90deg, rgba(255,0,0,0.1),rgba(0,255,255,1))

    can this be done via a function?

    Many thanks
    Ben

    #1806362
    Ying
    Staff
    Customer Support

    Hi Ben,

    The more updated way to create a page hero is to use a block element – page hero, you can set two colors gradient background there.
    This article should be helpful: https://docs.generatepress.com/article/block-element-page-hero/

    The only function in Header element that the Block element doesn’t have is to merge header and page/page hero.
    If you want to merge the block element with header, then this video should help:
    https://www.youtube.com/watch?v=TP8mgBQTgGg

    Let me know 🙂

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