CSS codes don’t work in wordpress
-
Hello,
I am using WordPress 5.2.2 and I am encountering a problem with my CSS code editor.
When I go to « Additional CSS », I can type in a simple program like
h1{ color: #fff; } in order to change my post titles’ color. However, once the code has been written, nothing happens on my website page. Also, when I look for tutorials to help me code in css, it happens that I write exactly the indicated code lines and still, nothing changes on my webpage.
On the other hand, a few codes can work on my wordpress website. This one is an example: p{ background-color: #808080;}I am not yet very familiar with wordpress so, please can you precisely explain me how I can get my CSS codes to work with wordpress?
I would be grateful for your answers. -
Hi @explinart, if your theme is more specific in its rules than h1 { color: #fff }, it will override a more general setting like that.
Also, you didn’t include a link to your site, but I’m guessing that it’s not using our managed hosting service, based on you knowing the version number. WordPress.org has a separate forum for self-managed, DIY installations. This one is for free sites hosted here. We take care of the software for our users so they don’t have to deal with the more technical end of things, and there are several other differences as well.
That said, even though our service is fairly different from the free software, I’m guessing this article will help you find the correct selector so you can get a handle on your CSS:
https://en.support.wordpress.com/custom-design/how-to-find-your-themes-css/The videos will actually walk you right through using inspect element to find the proper way to reference it in your custom CSS.
Again, some settings might look a bit different here vs on your own installation, but I hope that helps. If you need more help, head on over to https://wordpress.org/support/forums/ . Cheers!
-
Indeed, I locally installed WordPress on my mac and I used MAMP to do it.
However, what do you mean by “free sites hosted here”? Where are these sites hosted? -
WordPress.com is a hosting provider. We’re not the same thing as the open source WordPress software made by the community on WordPress.org.
In this forum we can only help with sites that are hosted on our servers.
Your locally installed site is hosted on a virtual server, not connected to the web, directly on your Mac’s hard drive, and is using the open source software, so we’re not able to help with this.
Your best option here will be to contact support for the specific theme you’re using. If you downloaded the theme from WordPress.org/themes, or installed it by searching at Appearance ->Themes in your site’s dashboard, the theme will have a support forum over on WordPress.org where you can get help directly from the theme’s developers.
-
Alright, thank you very much for your help. I will send my request to the developers of my theme.
- The topic ‘CSS codes don’t work in wordpress’ is closed to new replies.