free hit counters
If you are using Internet Explorer as your browser please be running at least IE 7 or above. This site does not support IE 6 or below. Go here for the latest free version including easy download and installation instructions If you want to make it real easy on yourself, download Firefox , the most popular browser in the world. It's free and simple. You'll be so glad you did.
May
12
2009

Add a drop cap to your post or page

The letter “T” that begins this sentence is an example of a drop cap. This was made by just assigning the very first letter of the sentence a unique class name and styling it in my custom.css file. You can make a class for the drop cap and use it over and over again on any post or page on your site. Here’s a really simple way to create your own individual drop cap.

The first thing you want to do is assign a unique name to the drop cap class and put it in your custom.css. I named mine simply “dropcap”…

.custom .dropcap {}

Next, figure out where you want to place the drop cap and insert the following tags with the unique class name…

<span class=”dropcap”> </span>

For example, I wanted to put a drop cap at the beginning of the opening paragraph of this post..

<span class=”dropcap”> T </span>he letter “T” that begins this sentence is an example of a drop cap. This was made using the Arial font. You can make a class for the drop cap and use it over and over again on any post or page on you site. Here’s a really simple way to create your own individual drop cap.

Now in my custom.css I add some styles to the drop cap to make it look like the way I want…

.custom .dropcap {
color: blue;
float: left;
font-size: 4.8em;
margin: .3em .2em .1em 0;
}

You can pick and chose how you want your own drop cap to look with your own styles

Now you can place this in any post or page. When you’re writing or editing a post or page, make sure you’re in the html editor…

471

and simply apply the tags from the example above and wrap them around whatever letter you want to do it to

Leaving a comment with code in it...

If you would like to leave a comment and you have examples of code you want to show, you must "escape the code". This allows the entire code to show correctly by inserting certain variable around certain tags to make them show. If you don't "escape the code" your code will show up broken, mangled, and it won't be able to be seen correctly. "Escaping the code" is very simple...

  1. Copy your code you want to show
  2. Click here to go to the site to escape the code
  3. Follow the directions, it's so easy
  4. Once you have the escaped code copied, paste it in the comments area where you want
  5. Now you can enjoy life


Go ahead, leave a comment...

{ 4 comments… read them below or add one }

Jorge l Nokia Mobile Talk May 15, 2009 at 11:54 am

Love your post and site as well, you know what I’d love to see a blockquote or pullquote tutorial, I’m so dying to learn how to do this, its not even funny. thanks

Reply

Nasty May 15, 2009 at 3:41 pm

Check these out and see if there’s anything else you want to know about them…

http://www.thesishacker.com/category/blockqoutes

Reply

Julie G May 16, 2009 at 1:43 pm

I love the idea of drop caps, but I haven’t been able to make this work. In my custom css file, I have

.custom .dropcap {
color: #90962a;
float: left;
font-size: 4.8em;
margin: .3em .2em .1em 0;
}

but it’s not showing up.
http://juliegomoll.com/SF3/history/a-history-of-wiscon/

Awesome blog – you’ve helped me a ton :)

Reply

Nasty May 17, 2009 at 8:00 pm

Did you do the first part and wrap the first letter with the tags? Your font size and margins might have to be different than mine. Everybody is different. They’re there for an example but may have to be adjusted depending on whats on your page.

When I looked at it with firebug I cant find the selectors for the drop cap. When you edited your custom.css did you save it and upload it again to your server?

Reply

Leave a Comment

Previous post: Highlight any part of your post or page

Next post: Move the tagline to a different spot in the header