SpyreStudios

Web Design and Development Magazine

  • Design
  • Showcase
  • Inspirational
  • Tutorials
  • CSS
  • Resources
  • Tools
  • UX
  • More
    • Mobile
    • Usability
    • HTML5
    • Business
    • Freebies
    • Giveaway
    • About SpyreStudios
    • Advertise On SpyreStudios
    • Get In Touch With Us

Quick Tip: Easy Way To Create Drop Caps On Your Blog

March 21, 2009 by Jon 16 Comments

A drop cap is when the first letter of a paragraph is larger than the average font size and that letter ‘drops’ down 2 (or more) lines. You can actually see this right here on SpyreStudios. I’ve attached a screenshot for those of you reading via a feed reader:

Drop Caps on SpyreStudios

No Need For A Plugin

So, we already know WordPress is awesome, there’s a lot of things you can do with it and there’s a even a plugin that automatically creates drop caps. Nice! But what if you don’t want to use a plugin (I sure don’t!) and you actually want to have drop caps only on some posts, and maybe elsewhere on your site? (read: you’re a control freak just like me when it comes to design)

Well, good news is you don’t need a plugin to create nice drop caps on your blog, all you need is some CSS and a span tag! First of all, go edit your stylesheet (usually the style.css file)

And simply add the following code:

[html]
span.dropcaps {
font-family:Georgia, serif;
color: #ccc;
font-size: 46px;
float: left;
font-weight: 400;
line-height: 1em;
margin-bottom: -0.4em;
margin-right: 0.09em;
position: relative;
}
[/html]

Or something similar top the CSS above. Of course you need to style this to fit your actual design and typography. The font-size, marings and line-height will vary depending on your design and typography, but this should give you some ideas :)

Add The Span

Now here’s the easy part (ok, well the CSS was pretty easy too), simply wrap the first letter of your post inside a span, like this:

[html]
<span class="dropcaps">A</span>
[/html]

And voila! You got a nice drop cap, it looks good, you’re happy, the world is happy, and.. well, did I mention it looks good? :)

Filed Under: CSS, Tutorial, WordPress

Comments

  1. Brandon Cox says

    March 21, 2009 at 8:40 pm

    But how do you “bus a cap” in yo blog? Kidding. Nice technique! Gonna include a link in my favorites list tomorrow.

  2. Logan Leger says

    March 21, 2009 at 10:08 pm

    Alternatively, you can use the “first-letter” pseudo-element.

    p:first-letter {
    font-family:Georgia, serif;
    color: #ccc;
    font-size: 46px;
    float: left;
    font-weight: 400;
    line-height: 1em;
    margin-bottom: -0.4em;
    margin-right: 0.09em;
    position: relative;
    }

  3. zafra says

    March 21, 2009 at 11:28 pm

    Hi!, love your blog. This tip work to in blogger?

  4. Joel Laumans says

    March 22, 2009 at 10:18 am

    Great tip!

    The advantage of using Logan’s method is that you can then use it for dynamic texts as well. (avoiding the hassle of having to manually insert the tags.

  5. Jon Phillips says

    March 22, 2009 at 12:49 pm

    @Brandon: lol thanks man! :)

    @Logan Leger: Nice one Logan! I just figured it’d be nice to be able to place the drop cap exactly where I want it, but the pseudo-element would work real nice too!

    @zafra: For sure it’d work on Blogger, you just need to add the CSS code and add the span where you want your drop caps.

    @Joel Laumans: Hey I didn’t think of that! Good point :)

  6. Selvam says

    March 23, 2009 at 3:26 am

    thanks

  7. Niki Brown | The Design O'Blog says

    March 23, 2009 at 7:24 am

    Nice Tip! I did a quick video tip on this a few weeks ago: http://www.nikibrown.com/designoblog/2009/02/24/quick-tip-20-drop-a-cap-in-your-paragraph/ Drop caps are a nice progressive enhancement :)

  8. Jon Phillips says

    March 23, 2009 at 7:32 am

    @Niki: Hey nice vid! Yep, nice enhancement, and like you said in your vid, people with IE may not see it, but who cares? hehe Oh and I just realized you had the iTunes feed (just subscribed!) Thanks for stopping by :)

  9. Devon says

    October 3, 2009 at 9:01 am

    Very thoughtful post . It should be very much helpful
    Thanks,

  10. Jenny says

    May 9, 2010 at 12:07 pm

    Awesome :D I am totally using this on my site :D

  11. mbreti3gut says

    June 2, 2010 at 8:45 pm

    Hey, this is just I need for my blog. Thanks a lot

Leave a Reply

Your email address will not be published. Required fields are marked *

Please prove you're human *

Recent Posts

  • What Factors Determine the Best Digital Marketing Agency?
  • 31 Fresh Design Elements for Spring and Easter
  • 10 Templates for Music Concert Flyers
  • How to Build a Web Scraper Using Node.js
  • Best PHP Books, Courses and Tutorials in 2022

Archives

  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • May 2008
  • April 2008

Categories

  • Accessibility
  • Android
  • Apps
  • Art
  • Article
  • Blogging
  • Books
  • Bootstrap
  • Business
  • CSS
  • Design
  • Development
  • Ecommerce
  • Fireworks
  • Flash
  • Freebies
  • Freelance
  • General
  • Giveaway
  • Graphic Design
  • HTML5
  • Icons
  • Illustrator
  • InDesign
  • Infographics
  • Inspirational
  • Interview
  • Jobs
  • jQuery
  • Learning
  • Logos
  • Matrix
  • Minimalism
  • Mobile
  • Motion Graphics
  • Music
  • News
  • Photoshop
  • PHP
  • Promoted
  • Rails
  • Resources
  • Showcase
  • Tools
  • Tutorial
  • Twitter
  • Typography
  • Uncategorized
  • Usability
  • UX
  • Wallpapers
  • Wireframing
  • WordPress
  • Work

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

SpyreStudios © 2022