Friday 11 January 2008

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 {
font: Arial;
font-size: 1.2em;
color: #800080;}
Now, when you want a to use this font in a post, wrap the text inside span tags like this:
<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{
font: Georgia;
font-size: 1.2em;
color: #800080;}
Then when posting,make sure to choose the corresponding span class.
<span class="extrabodyfont1">your text here</span>
The possibilities are endless!!

post signature

No comments:

Post a Comment