1

I've installed the twenty eleven theme and created a child theme based on it. I copied the entire style.css from the parent theme with all the changes I want to the child theme's css and most of the css work but a handful cannot be overwritten.

I also tried adding !important but that doesn't work too.

In this first example, the background-color: #448fbf was applied to the child theme but it doesn't show up when I load my site. It still remains as the background color of the parent theme. The first screenshot is from my WP dashboard and the second one is from chrome's inspector.

enter image description here

enter image description here

In the second example, the -webkit-appearance: none is not being applied to the child theme.

enter image description here

enter image description here

I'm wondering if it is the theme itself that is causing this problem. I've spent a fair amount of time working on this theme and really hope I don't need to look for another theme to start customizing from scratch again.

Help is much appreciated. Thanks in advance.

3
  • Your screenshots of the inspector show that the rules are being applied. Don't they? If the results aren't matching your expectations, then that seems like an issue with your CSS. Not anything to do with WordPress, or the theme.CommentedJul 27, 2021 at 14:07
  • The background color that I set was supposed to be blue but it still remains as black. Clearing the cache didn't work either. What could the issue be with the CSS?
    – Rach_L
    CommentedJul 27, 2021 at 14:16
  • I can't say with the information you've shared. There's lots of possibilities. The most obvious is that there's another element on top of it. But the fact is that the inspector shows the blue colour from your CSS, so WordPress is doing everything it's supposed to.CommentedJul 27, 2021 at 14:22

1 Answer 1

0

I realized that I didn't use the same label as what was indicated in the parent theme. E.g.: "background" instead of "background-color". After using the same label, the changes took place. Problem solved!

    Start asking to get answers

    Find the answer to your question by asking.

    Ask question

    Explore related questions

    See similar questions with these tags.