Title: Background Image In Sidebar   CSS problem
Last modified: August 20, 2016

---

# Background Image In Sidebar CSS problem

 *  [Ichabod2](https://wordpress.org/support/users/ichabod2/)
 * (@ichabod2)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/background-image-in-sidebar-css-problem/)
 * Hi all,
    I am attempting to add a little separation from the center content in
   my left and right sidebars. It is easy to just add a background color, but the
   color abruptly ends at whatever height I set, and I don’t like that look. Consequently,
   I thought I would create a vertical gradient from light gray to white. This way
   the background would just blend into the white page background. I created the
   image as a narrow .jpeg. I added
 *     ```
       background-image: url (images/sidebar_gradient.jpg);
       background-repeat: repeat-x;
       ```
   
 * to #secondary in my style sheet. Why does the background-color work, but not 
   background-image.
 * Also, I have found that occasionally some CSS will not work from the style sheet,
   but does work if I embed it in the HTML tag. Has anyone experieinced this? Found
   a solution?
    Thanks for any help.

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/background-image-in-sidebar-css-problem/#post-2321706)
 * without seeing the problem, nobody can really help with your issue.
 * please post a link to your site.
 * try without the space between `url` and the bracket `(`
 * [http://www.w3schools.com/css/css_background.asp](http://www.w3schools.com/css/css_background.asp)
 *  Thread Starter [Ichabod2](https://wordpress.org/support/users/ichabod2/)
 * (@ichabod2)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/background-image-in-sidebar-css-problem/#post-2321734)
 * Great call, alchymyth!
 * I removed the space and viola! there was my gradient sidebar. Thank you.

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

The topic ‘Background Image In Sidebar CSS problem’ is closed to new replies.

## Tags

 * [background images](https://wordpress.org/support/topic-tag/background-images/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Ichabod2](https://wordpress.org/support/users/ichabod2/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/background-image-in-sidebar-css-problem/#post-2321734)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
