How to Darken the fonts of my posts?
-
Hello,
I’m having trouble with reading my own posts on my blog and I want the typeface to be darker. Except, I have close to 200 posts and I don’t want to go manually and change them all one at a time. Is there some way that I can darken the text so that it is around this color?
http://nonsensicalover.com/2014/11/08/encouraging-others-to-write/
Thank you in advanced.
The blog I need help with is: (visible only to logged in users)
-
In order to change the weight or color of a font on a website, first you need to be able to identify what text to target. Anything with a specific rule in the current theme’s CSS will need to be found, and then what you can do is write new CSS rules to override the current ones. How many you need will depend on your theme and exactly what text you want to change.
I looked at http://nonsensicalover.com/2014/11/08/encouraging-others-to-write/ and I see that some of the text such as the post meta data below the post title and some of the text in the widgets on the right are a light gray color. You mentioned posts specifically though, so I assume you are talking about the text inside the post that begins with “Since starting NaBloPoMo one of the things I actually haven’t done is.”
I researched the post a bit further, and I discovered that you have set the color of that text using the WordPress.com post editor. I can tell because the HTML for the content is structured like this:
<p><span style="color:#333333;">paragraph text</span></p>That span HTML tag is what is setting the color of the text in the body of that post to a dark gray color instead of black. The very best way to remove that would be to edit each one manually, but you can also override it with a very strong CSS rule. If you take this route, then you will no longer be able to set the color in the editor in the future. If that’s okay with you, then you can take this route.
Here is an example that will turn every case where there is a “span” tag inside a “p” tag and make that text black, overriding the rules set by the WordPress editor in all cases:
.entry-content p span { color: #000 !important; }That is a very strong CSS rule. It’s a tradeoff because you lose the ability to see the text color via the editor.
One alternative might just be to make the font larger. It might look more readable that way without having to override all of the customized span tags that were added via the editor in the past. Here is an example you can try out instead of the rule above to see what you think:
.hentry { font-size: 120%; line-height: 1.6em; }
- The topic ‘How to Darken the fonts of my posts?’ is closed to new replies.