Title: Code for image as background not working
Last modified: March 24, 2018

---

# Code for image as background not working

 *  [trentyseb](https://wordpress.org/support/users/trentyseb/)
 * (@trentyseb)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/code-for-image-as-background-not-working/)
 * Hi,
 * I would like this image as background on my website: [https://proinprivacy.nl/wp-content/uploads/2018/03/Dots-1.png](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(http://proinprivacy.nl/wp-content/uploads/2018/03/
   Dots-1.png);}`
 * But this didn’t work.
 * Also tried `body {background: url(http://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)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [8 years, 1 month ago](https://wordpress.org/support/topic/code-for-image-as-background-not-working/#post-10111063)
 * 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](https://wordpress.org/support/users/trentyseb/)
 * (@trentyseb)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/code-for-image-as-background-not-working/#post-10111244)
 * Thank you. Just removed the coming soon page!
 * Hope you can help me with the CSS now.
    -  This reply was modified 8 years, 1 month ago by [trentyseb](https://wordpress.org/support/users/trentyseb/).
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [8 years, 1 month ago](https://wordpress.org/support/topic/code-for-image-as-background-not-working/#post-10111324)
 * The background seems OK, but
 *     ```
       Mixed Content: The page at 'https://proinprivacy.nl/' was loaded over HTTPS, but requested an insecure image 'http://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 'http://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 'http://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 'http://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 'http://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 'http://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 'http://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 'http://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 'http://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 'http://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 `http://proinprivacy.nl`
   and replace with `https://proinprivacy.nl`
 *  Thread Starter [trentyseb](https://wordpress.org/support/users/trentyseb/)
 * (@trentyseb)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/code-for-image-as-background-not-working/#post-10111344)
 * 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)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [8 years, 1 month ago](https://wordpress.org/support/topic/code-for-image-as-background-not-working/#post-10111355)
 *     ```
       .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.wordpress.org/CSS#Custom\_CSS\_in\_WordPress](https://codex.wordpress.org/CSS#Custom_CSS_in_WordPress)_
 * Learn to use the [Chrome Developer Tools](https://developers.google.com/web/tools/chrome-devtools/)
   to help you see and test changes to your CSS.
    -  This reply was modified 8 years, 1 month ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  Thread Starter [trentyseb](https://wordpress.org/support/users/trentyseb/)
 * (@trentyseb)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/code-for-image-as-background-not-working/#post-10111385)
 * 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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [trentyseb](https://wordpress.org/support/users/trentyseb/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/code-for-image-as-background-not-working/#post-10111385)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
