A question about fonts
-
I want to change my h3 fonts for posts, e.g. ‘Working without prejudice’ in http://www.timorharii.org/about-us.
However when I changed the h3 font family, widget headings and the ‘Latest post’ heading on my homepage was also affected.
Is there a way to specify font-related edits specifically for posts?
The blog I need help with is: (visible only to logged in users)
-
This was what I added:
h3 {
font-size:1.25em;
font-family: georgia, serif;
line-height:1.75;
color:#a11b1b;
} -
h3 is used all over the place so you have to specifically target the ones you want to change. In this case, you want to target h3 in the particular parent div such as this.
.primary-content h3 { font-family: Georgia, "Times New Roman", serif; }Notice that I did not include the color, font size or the line height because what you had is exactly what was set in the h3 selector in the original stylesheet. Never duplicate things from the original stylesheet in your custom stylesheet. If it does not change, do not include it. All you need is the font family declaration.
Notice also that I included Times New Roman and serif? That is because if you set only one single font, and a visitor’s computer does not have that font, then you are allowing the browser to substitute whatever font it wants to and depending on how a person has their preferences set, it could completely blow up your site.
-
Thanks very much Mr Path. I took your advice and cleaned up some of the rest of my custom CSS so that only edits to the original show.
-
You are welcome. With duplicates in the custom CSS, sometimes browsers can get things messed up so the fewer of those instances there are the better.
- The topic ‘A question about fonts’ is closed to new replies.