playing, by Denise

Monday, December 22, 2008

Use my font!

Do you want to use a specific font in one of your sidebar gadgets?

If you choose to use an HTML/JavaScript gadget, you can embed your text within a div, where that div is defined as CSS in your Blogger template. The div can specify the characteristics of the text that is embedded in that div.

If you want to see an example, look to the side, and the entry titled USE... MY DESIRED FONT. The font shown (in the entry below that title) is Comic Sans MS. If that font isn't installed on your computer, the words will use the font Verdana. The color is specified as #cc00ff, the font weight is set to bold, and the size to 120%. I always specify the size as a % so that it will reflect changes the viewer makes to the text size in his or her browser.
(Yes, I know, Firefox will always resize on the viewer's request, but IE won't if the font is set to exact pixels as opposed to percentages.)

The first step is to add a chunk of CSS to your blogger template. Here's what I used:
#myFont {
font-family: Comic Sans MS, Verdana;
font-weight: bold;
font-size: 120%;
color: #cc00ff;

And then, as the content for the sidebar gadget, I used this:
<div id="myFont">
running, dancing, prancing...


No comments:

Post a Comment