• Hi,

    I would like this image as background on my website: https://proinprivacy.nl/wp-content/uploads/2018/03/Dots-1.png

    So I hovered over the site with Firebug to find the section I want to change and that is the def section. So I tried the following code in CSS .def_section, blockquote {background: url(https://proinprivacy.nl/wp-content/uploads/2018/03/Dots-1.png);}

    But this didn’t work.

    Also tried body {background: url(https://proinprivacy.nl/wp-content/uploads/2018/03/Dots-1.png);} but that didn’t work either.

    Can someone tell me what i’m doing wrong please?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    If your site is using https, then the URL in the CSS must also be https, not http.

    When I look at your site, all I see is a coming soon page. Please remove that if you want help with the CSS.

    Thread Starter trentyseb

    (@trentyseb)

    Thank you. Just removed the coming soon page!

    Hope you can help me with the CSS now.

    • This reply was modified 6 years, 11 months ago by trentyseb.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    The background seems OK, but

    Mixed Content: The page at 'https://proinprivacy.nl/' was loaded over HTTPS, but requested an insecure image 'https://proinprivacy.nl/wp-content/uploads/2018/03/PIP-Logo-2.png'. This content should also be served over HTTPS.
    (index):108 Mixed Content: The page at 'https://proinprivacy.nl/' was loaded over HTTPS, but requested an insecure image 'https://proinprivacy.nl/wp-content/uploads/2018/03/PIP-Logo-2.png'. This content should also be served over HTTPS.
    (index):108 Mixed Content: The page at 'https://proinprivacy.nl/' was loaded over HTTPS, but requested an insecure image 'https://proinprivacy.nl/wp-content/uploads/2018/03/PIP-Logo-2.png'. This content should also be served over HTTPS.
    (index):108 Mixed Content: The page at 'https://proinprivacy.nl/' was loaded over HTTPS, but requested an insecure image 'https://proinprivacy.nl/wp-content/uploads/2018/03/PIP-Logo-2.png'. This content should also be served over HTTPS.
    (index):1 Mixed Content: The page at 'https://proinprivacy.nl/' was loaded over HTTPS, but requested an insecure image 'https://proinprivacy.nl/wp-content/uploads/2018/03/Dots-1.png'. This content should also be served over HTTPS.
    (index):494 Mixed Content: The page at 'https://proinprivacy.nl/' was loaded over HTTPS, but requested an insecure image 'https://proinprivacy.nl/wp-content/uploads/2018/03/PIP-Logo-2.png'. This content should also be served over HTTPS.
    jquery.js:4 Mixed Content: The page at 'https://proinprivacy.nl/' was loaded over HTTPS, but requested an insecure image 'https://proinprivacy.nl/wp-content/uploads/2018/03/PIP-Logo-2.png'. This content should also be served over HTTPS.
    attr @ jquery.js:4
    jquery.js:4 Mixed Content: The page at 'https://proinprivacy.nl/' was loaded over HTTPS, but requested an insecure image 'https://proinprivacy.nl/wp-content/uploads/2018/03/PIP-Logo-2.png'. This content should also be served over HTTPS.
    attr @ jquery.js:4
    jquery.js:4 Mixed Content: The page at 'https://proinprivacy.nl/' was loaded over HTTPS, but requested an insecure image 'https://proinprivacy.nl/wp-content/uploads/2018/03/PIP-Logo-2.png'. This content should also be served over HTTPS.
    attr @ jquery.js:4
    jquery.js:4 Mixed Content: The page at 'https://proinprivacy.nl/' was loaded over HTTPS, but requested an insecure image 'https://proinprivacy.nl/wp-content/uploads/2018/03/PIP-Logo-2.png'. This content should also be served over HTTPS.

    Install the plugin “better search replace”. Search for https://proinprivacy.nl and replace with https://proinprivacy.nl

    Thread Starter trentyseb

    (@trentyseb)

    Replaced all.

    But it didn’t work for the background. It’s the .def_section where I want the pattern as background but if I try to change this section with CSS nothing changes.

    .def_section, blockquote {
        background: #ff0909;
    }
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    .def_section, blockquote {
        background: #ffffff;
        background: url(https://proinprivacy.nl/wp-content/uploads/2018/03/Dots-1.png);
    }

    To add CSS: use the “Additional CSS” option in the customizer. https://codex.www.ads-software.com/CSS#Custom_CSS_in_WordPress

    Learn to use the Chrome Developer Tools to help you see and test changes to your CSS.

    Thread Starter trentyseb

    (@trentyseb)

    That worked. Thanks a lot!!

    Can you also explain why it works via Extra CSS but it doesn′t via the Custom CSS plugin=

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Code for image as background not working’ is closed to new replies.