The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Change background color of page/body (6 posts)

  1. kubegusa
    Posted 3 years ago #

    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.


  2. Andrew Nevins
    Forum moderator
    Posted 3 years ago #

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

  3. WPyogi
    Forum Moderator
    Posted 3 years ago #

    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.

  4. kubegusa
    Posted 3 years ago #

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

  5. kubegusa
    Posted 3 years ago #

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

  6. WPyogi
    Forum Moderator
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic