• Resolved melanie0002

    (@melanie0002)


    Hello Blossom-Pin,

    First exchange with you ??
    I need your help for an image integration. I added an image on the home page with this code:

    .site-content:before{
    content:””;
    background:url(/wp-content/uploads/2020/09/marble-2398946_1920.jpg);
    height: 250px;
    width:100%;
    display:block;
    }

    Nevertheless, this image is displayed on all pages of my site. This is not what I want. How can you help me?

    Sincerely yours ??

    • This topic was modified 3 years, 8 months ago by melanie0002.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @melanie0002,

    If you want to add the image to the homepage only then you can replace the above code with the following CSS code:

    .home .site-content:before{
        content: '';
        background: url(/wp-content/uploads/2020/09/marble-2398946_1920.jpg);
        height: 250px;
        width: 100%;
        display: block;
    }
    Thread Starter melanie0002

    (@melanie0002)

    Hello and thank you for your feedback.

    It works well ??

    • This reply was modified 3 years, 8 months ago by melanie0002.
    Thread Starter melanie0002

    (@melanie0002)

    Is it better to add this code in the child theme eventually? Because I have created one.

    Thread Starter melanie0002

    (@melanie0002)

    I would like to know how to make this image not appear in the mobile version. If it possible.

    Hi @melanie0002,

    You can add the CSS code in the Additional CSS field of the customizer for easy access.

    To remove the image added from the mobile view, you can use the CSS code below:

    @media only screen and (max-width: 767px) {
        .home .site-content:before {
            display: none;
        }
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add an image’ is closed to new replies.