Possibly a precedence issue caused by either specificity or the order rules are encountered. Use your browser’s element inspector tool to see what rules are actually applied to a given element. Equivalent rules with less precedence will appear either lined through or grayed out. If the rule from your style.css is lined through, it’s a precedence issue. If the !important modifier works, this further reinforces the notion that precedence is the issue.
To avoid the need to use !important, your rule either needs more specificity or it needs to occur later. If there are only a few problem rules, try placing them in the Additional CSS customizer section instead of in style.css.
Thank you for your response. It is looking like a precedence issue. I am hesitant to put them in the customizer for fear that theme updates may delete them. Is this a valid concern and is there a reason for the style.css in the child-theme to be called with greater precedence?
Customizer content is theme related and stored as a theme specific option value. However, it will reliably persist through theme updates. Updates replace theme files, not options data. A big reason there is a custom CSS section is precisely to protect custom CSS from theme updates.
If you wanted to distribute your theme to others, the customizer wouldn’t be a good place for additional CSS, but for one particular site it’s fine. IMO it’s better than having to resort to the !important modifier. I really hate to use !important if I can at all help it.
Ok, this makes sense. Thank you so much. I guess now I am wondering how to apply wholesale changes easily. So, not just a few snippets of CSS, but rather a complete custom override of what a post or page design would default to. Do I create a new page.php or post.php file in the child-theme folder?
If you need to alter the HTML output, then a template file would need to be added or altered. A large amount of CSS ought to reside in its own file. The Additional CSS section wasn’t meant for many hundreds of lines of code.
Is this child theme subject to periodic updates? Or is it a child you created yourself? It’s not good practice to add or alter files to any theme subject to periodic updates, child or not. Unfortunately, we cannot create our own grand-child themes to contain our custom work.
Instead of a grand-child theme, we can create a plugin which contains our custom code. Loading a custom CSS file from a plugin is straight forward, but WP will not look in plugin folders for possible templates like it does for a child theme. The plugin has to force WP to use its templates for specific situations by using the “template_include” filter to lead to its template files.