background image for subpage content
URL to the page in question:
-
Hello Bill,
I would like to use a background image for the subpages. I’ve added the following custom code under the styling tab, but have been unsuccessful. It seems to be defaulting to the #e7e7e7 color whenever I do this.
Here’s the code:
#content {
background-image: url(‘images/image_name.jpg’);
background-repeat:repeat-y;
}
Is there another place where I need to change the code?
Thanks,
Carol
Carol,
You’re headed in the right direction. For the URL to your background image, you’ll want to use the absolute URL and not the relative one.
So instead of images/image_name.jpg, you’ll want something like http://yoursite.com/wp-content/themes/agency/images/image_name.jpg
One option would be to upload the image into your WordPress media library and then copy the URL to that image and use it in your CSS.
The reason is the relative URL is relative to the address of the page and not the theme. If you place the image inside the image folder that’s in the theme and then add the CSS to the bottom of the Style.css file, that would work too.
If I can help, let me know,
Bill
Hi Bill,
Thanks! That worked perfectly.
Carol
Fantastic Carol. Let me know if you need anything else.
- The topic ‘background image for subpage content’ is closed to new replies.