- This topic has 3 replies, 2 voices, and was last updated 5 years, 7 months ago by Andrew Misplon.
Tagged: css
- AuthorPosts
- March 28, 2019 at 5:22 pm #12389
Holden HaysParticipantHello, I have tried in several different ways to get CSS edits in the theme editor to work but they don’t. I can change the CSS in the Customize > Additional CSS just fine but if I try to take that same CSS and put it into the style.css file it’s like it completely ignores it.
for example on my site pemodea.com there is a simple h1 heading. If I wanted to hide it I can add h1{display:none;} and it will not disappear if I add that CSS to the styles.css file.
Not sure what to do at this point.
March 28, 2019 at 5:31 pm #12390
Andrew MisplonKeymasterHi Holden
Thanks for posting.
CSS is impacted by the order it’s loaded in and specificity. Additional CSS and the child style.css file aren’t loaded in the same place so the order is impacted. If I change your only child style.css rule as follows:
h1 { display: none; font-family: 'Roboto', sans-serif; }
The h1 on the home page is removed. Put another way, I’d need to try to assist with a specific example. There, unfortunately, isn’t a general fix here other than diving a bit deeper into CSS (https://css-tricks.com/specifics-on-css-specificity/). Which heading tag are you trying to hide? The h1 on the home will be removed if you change the rule as I’ve indicated above.
March 29, 2019 at 9:16 pm #12400
Holden HaysParticipantThank you, I found out that my server was caching the CSS so I was not seeing the edits! Thank you for your help!
March 29, 2019 at 10:39 pm #12401
Andrew MisplonKeymasterSuper 🙂 Really glad to hear you were able to resolve this. Sorry for not suggesting caching, I thought we were looking at more of a challenge with applying rules rather than rules not being there. If you have any questions in the future, please let me know.
All the best.
- AuthorPosts
You must be logged in to reply to this topic.