• http://www.barbed-wire-justice.com/cover-bound-letters/

    I copied what shows up from my original Yahoo site. As long as I copy it from the internet, it comes over with a background color. (Basically, this is what the cover of the Bound Letters I sent to Congress, looked like.

    But, the page isn’t responsive.

    So, is there a way to make a single page have a background color?

    As an aside, I used the copy method to resume putting images and link in this site, follow the total shutdown of my Add Media and Links functions in WP after I began showing the DOJ ties to Wells Fargo.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi, Karen:

    You need to be careful about copying over code from one site into a WordPress page or post. You can see that the text sort of overflows into the right sidebar in some spots.

    To answer your question, the body element of each page will have a unique ID that you can use to target CSS to a specific page or post.

    Let’s take your Understanding Due Process page as an example. If you do a “view source” or inspect the page using a web debugging tool like Firebug or Chrome Dev Tools, you’ll see that the <body> element has the class page-id-271. So you can use that class as part of your CSS selector to target just elements on that page.

    If you wanted to change the background color of the main content area (including the sidebar) of that page to green, you would add a rule like this to your CSS (don’t forget to add the period at the beginning of your class name):

    .page-id-271 #main {
       background-color: #bfb;
    }

    Adding the .page-id-271 class, which is unique to the Understanding Due Process page, to the selector will allow the rule to only affect that particular page and not any others.

    Hope that helps.

    Thread Starter considerthis1

    (@considerthis1)

    Sorry for the really horrible ongoing typos above.

    Also, I took out the references to Table, and it became responsive, but the color disappeared.

    And, I forgot to mention that I found this in another topic:

    body.page-id-4 {
    background-color: #FF0000 !important;
    }

    I tried adding that to my Various css, but with my page number, and it had No effect.

    Thread Starter considerthis1

    (@considerthis1)

    Darn it, the above is from hours ago. For a long time it wouldn’t let me post it. Now it got posted but what I just wrote, got lost. Sigh.

    I don’t want the sidebar to be changed.

    I’ll go put that code into my various css and see what happens.

    Thread Starter considerthis1

    (@considerthis1)

    Hi again, CrouchingBruin…

    Would you believe it… You’re RIGHT. Too intense!!!!

    Wow, that is totally amazing to me. It’s so easy… when YOU do it!

    I also put in a question to Tobias of TablePress because I saw that the stuff with colored backgrounds that I copied from Yahoo all came over as tables, so I thought maybe I could put the text into a table, which works, then change the color of the table background… I’m waiting to hear.

    I’m thinking it’s probably not a good idea to make a lot of my pages different colors .. just because I now know how… I’m fighting the inclination …

    Please will you let me know if there’s a way to NOT have the sidebar change????

    Thread Starter considerthis1

    (@considerthis1)

    Refining my question. I want to sort of recreate the cover of the Bound Letters I sent to the Congressional Committee on .. I forget. So in actual fact I don’t want the whole “body” a different color, just a portion of it….

    Oh, I know, I was thinking that if I could find the code in Yahoo for that one bit being a different color, then I could put it into an HTML adding plugin I have and put it in as if it were an ad…

    I can make html for my sidebar ads using the TEXT view, but I don’t see a way of doing the color for just a bit of wording, in the TEXT view.

    I think if I knew the code it might work.

    Thread Starter considerthis1

    (@considerthis1)

    You truly are like Magic to me, CrouchingBruin.

    Even though I thought the html thing would work, I couldn’t seem to make the jump into actuality.

    After your post I searched for HTML, and … found it quite easily. So now I have the basic format to make a colored text box… Oops, I forgot to test it for being responsive…

    Happiness!!! It’s responsive.

    Thank you SO Much!!!!

    Thread Starter considerthis1

    (@considerthis1)

    Thank You, Thank You, Thank YOU!!!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to change the background color of a single page’ is closed to new replies.