WordPress.org

Forums

Change background color of sidebar (2 posts)

  1. amandadgr
    Member
    Posted 1 year ago #

    Hi,

    I am trying to change the sidebar color of this page:
    http://www.dgrlegal.com/paralegal-resource-guide/

    I have the sidebar inserted as a page: http://www.dgrlegal.com/paralegal-resources-sidebar/
    and have added in css to change the color:

    body.page-id-1031 {
    background-color: #E0E0E0;
    }

    The color shows up when viewing the sidebar as a page in itself, but the CSS doesn't show when it's placed into the sidebar on the Resources page. Any suggestions on how to fix this? I've been trying different things like crazy over the past hour with no solution!

    Thank you!!!

  2. Hey there.

    The CSS you're using is specifically targeting the page with an ID of 1031. To fix it so that it targets all the pages in your site, change page-id-1031 to page in your CSS snippet. This will leave you with:

    body.page {
    background-color: #E0E0E0;
    }

    :)

Topic Closed

This topic has been closed to new replies.

About this Topic