Support » Themes and Templates » [Resolved] Change background color of page/body

[Resolved] Change background color of page/body

  • Hi
    I have been pulling out my hair to find how to change the page/body background color to match the color I changed in the site generator part of my Twenty eleven child theme. I’ve read a lot of existing suggestions on this forum, but none worked for me so far.

    My link is http://www.route32.be/demaeyer/

    This is what I have added to my child style.css:
    body { color: #C7F0FB; }
    #page { background: #C7F0FB; }

    But, the background color of the body/page area remains the default white.
    Would dearly appreciate any suggestions. I think something is overwriting my changes, or, I need to make additional changes. I also am not 100% on the coding, as I’m finding that it’s possible to use ‘color’ or ‘background’ or ‘background-color’ to define the background color. I’ve tried all of them and in many combinations but no success so far.


Viewing 5 replies - 1 through 5 (of 5 total)
  • Andrew Nevins
    Forum moderator


    Try adding your CSS in a Custom CSS plugin, as the duplicated code pointed out below.

    Forum Moderator


    First off, your child theme is not correctly set up — the style.css file should only have changes and not the entire parent CSS code in it. As is, it’s duplicated code and it’s much harder to keep track of what you have modified. That’s causing the problem you now have as there is #page code on line 426 which is overriding your changes on line 33.

    So suggest that you delete everything in the child theme style.css file except whatever changes you want over the parent theme.

    I just realized that as I found your comment!! Thanks so much!

    Also thanks for the suggestion to use the Custom CSS plugin, I’ll check it out.

    Forum Moderator


    You don’t need the custom CSS plug-in if you are using a Child Theme — it will only add another stylesheet to your site — and probably cause more confusion as to where styles are set.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Change background color of page/body’ is closed to new replies.