[Resolved] Add background image to hook area

Home Forums Support [Resolved] Add background image to hook area

Home Forums Support Add background image to hook area

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1086517
    mikeb82

    I’m converting a website from an old theme to GeneratePress. Everything was going well until I encountered a roadblock. I need to add a fixed background image to the top right of the screen. I tried targeting the .site-header class with CSS without success. Is there a hook area between the body and the header I can use for this?

    Note: I also tried to add the image using elements by creating a div class with the background image. Only portions of the image were displayed.

    Thanks

    #1086779
    David
    Staff
    Customer Support

    Hi there,

    do you still have the old site so we can see what you’re trying to achieve?

    #1086808
    mikeb82

    Yes, it’s https://ccccccc.com

    It’s the falcon at the top right of the screen.

    #1086952
    David
    Staff
    Customer Support

    You can actually set multiple background images on an element like so:

    body {
        background-image: url('url-two-foreground-image'),url('url-two-background-image');
        background-repeat: no-repeat, no-repeat;
        background-attachment: fixed, fixed;
        background-position: right top, right top;
        background-size: auto, cover;
    }

    Make sure the Falcon image ( foreground ) is the first URL.

    #1087154
    mikeb82

    Thanks David,

    Your solution does exactly what I needed to do.

    Thanks again!

    Mike

    #1087158
    mikeb82

    Resolved

    #1087648
    David
    Staff
    Customer Support

    Glad to be of help

    #2181810
    Gerva

    Good morning
    OK with CSS I can solve the problem …
    But a curiosity, I am using thema from Broadcast library.
    I set the Blog page as archive instead of having it in home.

    Now I would like to have a background image underneath the different posts / the whole page.
    Is there an Element/hook with Generatepress to do this?
    Thanks

    #2181825
    David
    Staff
    Customer Support

    Hi there,

    do you want to start a new topic, and share a link to the page where you want to apply the background image

    #2181909
    Gerva

    Excuse me …
    Given the title I thought I’d latch onto the topic.
    OK open new topic.
    Thanks

    #2181915
    David
    Staff
    Customer Support

    No problems – its just this topic is quiet old, and if you open a new topic you get access to the private information field where you can share URLs etc.

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