Site logo

[Resolved] Add Background Image

Home Forums Support [Resolved] Add Background Image

Home Forums Support Add Background Image

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #869673
    Elaine

    Hello, I would like to add a background image to the main content area of the home page;
    the hook is either:
    generate_before_main_content or
    generate_inside_container
    However, what I have tried so far is just add a div with a class and then in the xtra CSS in the Customizer indicate that the div have a background image.
    The image shows up, but it does not ‘cover’ the content area as desired.
    Please advise!

    #869677
    David
    Staff
    Customer Support
    #869683
    Elaine

    OK, that is very helpful, thanks! However, how do I target a background image in the Content for just the Home page?

    #869687
    David
    Staff
    Customer Support

    You would need to use CSS like this:

    .home.separate-containers .inside-article {
        background-image: url('full_url_to_image');
    }
    #869717
    Elaine

    I added my full (url path to the image) to your CSS, but does not seem to be working! Image does not show. I also added ‘background-size: cover;’, that doesn’t help either.
    Please advise! Thanks.

    #869727
    David
    Staff
    Customer Support

    Sorry made a slight typo – i edited the code above

    #869733
    Elaine

    Yay! That works, and thank you!

    #869753
    David
    Staff
    Customer Support

    Glad to be of help

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