Jump to content
chuckm

Child Theme VS Custom Code CSS/LESS

Recommended Posts

chuckm

Noticed there are many instances where the CSS in my STYLE.CSS in my CHILD THEME does not take precedence over the default PAGELINES CSS. In these instances only the CUSTOM CODE CSS RULES area of the Framework in Admin will take precedence over the core PAGELINES CSS. How do you make the CHILD CSS - RULE THE SITE? Thanks in advance for your help!

Share this post


Link to post
Share on other sites
bxbmedia

hey @chuckm, Here is the basic order of loaded styles: iYk8X.png As you can see, child theme styles are printed last in the page source. If some of your styles aren't taking precedence over core css, you're probably having an issue with specificity, rather than where your styles are. See this short article to learn more. I a nutshell, you want to use the same selectors that core (or whatever css is being given precedence over yours) uses in your custom css as the core styles you are trying to override. Because your styles are output after all the others, they should take precedence, even with the same specificity. If for some reason it's still not taking (which it should) you can add more selectors to increase the specificity and thus take precedence. Hope that helps. If you're still having trouble, please provide a link to your site and an example or 2 where you are having trouble.

  • Like 1

gl hf

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×