Title: Changing Div Element Backgrounds
Last modified: August 22, 2016

---

# Changing Div Element Backgrounds

 *  [mattleaver](https://wordpress.org/support/users/mattleaver/)
 * (@mattleaver)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/changing-div-element-backgrounds/)
 * Hi Guys,
 * I have a simple questions regarding CSS.
 * I want to change the background of some of the elements on my homepage, i.e. 
   insert an image as a background or simply change the colour.
 * The website in question is here – [http://www.we-seed.co.uk](http://www.we-seed.co.uk)
 * I`m trying to customize the section titled ‘So What is Online Marketing’. I used
   the ‘inspect element’ function in chrome and came up with the following code 
   which I placed in the custom css section of the theme:
 * .page #page-content {
    background: #660033; background: rgba(255,255,255,0.94)!
   important;}
 * However this is not working at all for me, any ideas on how to fix it? I’m also
   keen on knowing how to use images for the backgrounds as well, is this a simple
   tweak?
 * Any help would be much appreciated, I’m sure its a simple fix!
 * Thanks,
 * Matt

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [stephencottontail](https://wordpress.org/support/users/stephencottontail/)
 * (@stephencottontail)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/changing-div-element-backgrounds/#post-5906303)
 * Does it work if you use:
 *     ```
       #page-content {
       background: #660033;
       background: rgba(255,255,255,0.94);
       }
       ```
   
 * Is there a reason you’re setting two separate background colors? Only the second
   background color will be applied.
 * To set a background image, try this code:
 *     ```
       #page-content {
       background-image: url( /path/to/image );
       }
       ```
   
 *  Thread Starter [mattleaver](https://wordpress.org/support/users/mattleaver/)
 * (@mattleaver)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/changing-div-element-backgrounds/#post-5906577)
 * Hi Stephen,
 * Thanks for your help on this!
 * I tried your above suggestion, however with no luck.
 * I also removed the second color code so there is no conflict. The code I have
   now is below:
 *     ```
       #page-content {
       background: #660033;
       }
       ```
   
 * Any ideas on what the issue might be?
 * Thanks,
 * Matt
 *  [stephencottontail](https://wordpress.org/support/users/stephencottontail/)
 * (@stephencottontail)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/changing-div-element-backgrounds/#post-5906578)
 * I don’t see this code on your site:
 *     ```
       #page-content {
       background: #660033;
       }
       ```
   
 * How did you add it? Did you receive any error messages? Is your host caching 
   your site?
 *  Thread Starter [mattleaver](https://wordpress.org/support/users/mattleaver/)
 * (@mattleaver)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/changing-div-element-backgrounds/#post-5906579)
 * Hi Stephen,
 * Apologies I had a .page piece of code before the entry which I think was stopping
   it from working.
 * I’ve amended this now and everything seems to be fine.
 * Thanks a lot for your help.
 * Matt

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Changing Div Element Backgrounds’ is closed to new replies.

## Tags

 * [css edit](https://wordpress.org/support/topic-tag/css-edit/)

 * 4 replies
 * 2 participants
 * Last reply from: [mattleaver](https://wordpress.org/support/users/mattleaver/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/changing-div-element-backgrounds/#post-5906579)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
