background image for subpage content

Support Area Forums Agency background image for subpage content

Viewing 4 posts - 1 through 4 (of 4 total)
URL to the page in question:
  • Author
    Posts
  • #10964
    Carol Fong
    Participant

    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

    #10968
    Bill Robbins
    Moderator

    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

    #10970
    Carol Fong
    Participant

    Hi Bill,
    Thanks! That worked perfectly.
    Carol

    #10971
    Bill Robbins
    Moderator

    Fantastic Carol. Let me know if you need anything else.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘background image for subpage content’ is closed to new replies.