• Hi there,

    I have a few special pages on my site that I’m hosting for a fundraiser and I’m setting them to look different from the rest of my site by inserting category-specific CSS. The one thing that I’m having trouble with is changing the background color. The property I was using for background (I think it was .background) changed the color in the body of each page. I want a different color “behind” or “around” the page content, similar to the “background color” setting in the customizer. So, what property should I use here with GeneratePress?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Tom

    (@edge22)

    Hi there, you should just be able to use body.

    body {
        background-color: blue;
    }

    If you’re not using a page specific CSS plugin, you’ll need to add the page ID:

    body.page-id-10 {
    
    }
    Thread Starter dalecameronlowry

    (@dalecameronlowry)

    Thanks! This seems to work a little differently from the one in the Customizer, as it provides a backdrop for the entire page (including the text at the center), whereas when I choose a Background Color in the customizer, the text has a white background and the color only shows to the left and right of the text block.

    But perhaps that’s a function of my using Elementor? If so, I’ll ask around there about solutions.

    Thanks!

    Theme Author Tom

    (@edge22)

    What element are you adding it to in the Customizer?

    Thread Starter dalecameronlowry

    (@dalecameronlowry)

    Do you mean the CSS? I added the CSS to Simple CSS on the page in question.

    Theme Author Tom

    (@edge22)

    You said:

    This seems to work a little differently from the one in the Customizer

    Which one in the Customizer? What option are you using?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘CSS background color property’ is closed to new replies.