Choices for Post Body Fonts
...For example:
I've been trying to add the Gothic Century (?) font to a blog template with little luck. I'd like the Sidebar title to be that Gothic font and the sidebar body to be Trebuchet. And say the post title font to be Gothic as well but with the Verdana font of the post body.
Further more I'd like to be able to have the sidebar body font at say a 10pt and the post body font at a 15pt, just as an example.
This was but one of the questions from Mr. Brown Thumb, my gardening friend in Chicago. As it turns out, while I was busy working on another project, another friend, Hans, came up with an easy solution. I must be living right!
I'll put Hans' solution here. He states that you can define an extra bodyfont-class in your CSS style sheet, for example:
.extrabodyfont {Now, when you want a to use this font in a post, wrap the text inside span tags like this:
font: Arial;
font-size: 1.2em;
color: #800080;}
<span class="extrabodyfont">your text here</span>This little piece of code has the added benefit of allowing you to change the size and color of the font also!
Another added bonus. If you are really fickle and want even more extrabody font choices, start labeling the classes .extrabodyfont1, .extrabodyfont2 etc. Then make changes to the class:
.extrabodyfont1{Then when posting,make sure to choose the corresponding span class.
font: Georgia;
font-size: 1.2em;
color: #800080;}
<span class="extrabodyfont1">your text here</span>The possibilities are endless!!
7 Comments:
Thank you so much! By following these simple directions I was able to do exactly what I wanted, on the first try! Wonderful!!!
~Patty
Nice post, simple instructions, I always use Verdana for post body as well
I have always wanted to changed the font on my blog. It is an online journal so a handwriting type of font would look great. I have not tried your little tweak yet but I will as soon as I finished posting this. Thank you.
Great post! Been toying around with the CSS style sheets a bit and have had moderate success thus far (trying to learn, but not exactly a computer guru! lol). Very helpful post!
when I'm blogging.I also want to change my font size but i didn't know how to do it.now i know what to do.useful article to me.
hey there !! I have changed the outer backgorund font of my blog to Trebuchet - size 14 / 16. But I wish to update my POST TEXTS (not POST TITLE) to the same font - I have over 100 posts, is there a way I could do this automatically rather than manually ?? Would appreciate if you can drop in a line at my ID : momchef77@gmail.com
thx and cheers !
Very cool CSS - makes my code cleaner.