Different background for each post category

  • Author
    Posts
  • #1324998

    imveryape
    Member

    I have several post categories (Best New Music, Hidden Gems etc). Is it possible using CSS to have a different background image for each section? I would still like to maintain that white fixed background for the post content, and have the image border either side.

    Thanks

    The blog I need help with is imveryape.com.

    #1325164

    Hi there, you can do this by targeting page IDs in your selectors as below.

    body.category-1048972 {
    background: url("URL OF IMAGE") no-repeat scroll 0 0 transparent;
    }

    You can find the category ID by viewing the source code on each category page and finding it in the opening body selector.

    Upload your images to the media library, get the URL of those images and then replace URL OF IMAGE between the double quote marks in the background declaration.

The topic ‘Different background for each post category’ is closed to new replies.