WordPress.org

Ready to get started?Download WordPress

Forums

drop caps (9 posts)

  1. jpierre
    Member
    Posted 10 years ago #

    A silly question:
    anyone knows whether it's possible to have drop caps in WP? and what is the tag, if it ever is allowed?
    JP

  2. davidchait
    Member
    Posted 10 years ago #

    Ummm, I added a nasty hack to do drop-caps on my site. It requires extracting the first character of the content block, and then wrapping it with a named div so it can be turned into a float in CSS. Go into any article on my site, and you'll see the result.
    I'm planning on converting to the new plugin architecture (assuming Matt got in the hooks I needed), and could release it as a plugin then.
    -d
    http://www.chait.net

  3. WillM
    Member
    Posted 10 years ago #

    You can get a similar effect using the p:first-letter pseudoclass, which saves you having to clutter up your entry with unnecessary <span>s

  4. davidchait
    Member
    Posted 10 years ago #

    If I recall correctly, much of the CSS pseudoclass stuff is either TBD or 2.0, and thus not generally available in the 'high use' browsers.. But yes, that's another completely different approach...
    -d

  5. jpierre
    Member
    Posted 10 years ago #

    Thanks guys. Seems to work fine with the <span> thing. I used the tutorial Cena refered to. Although not automated, the process is rather unpainful. I will try dchait's solution at a later time. But now I am into another kind of detais, so here's another question:
    suppose I want to use that drop cap in the <storytitle>, and place the <storytitle> on the same line as the post's first line...? :)
    JP

  6. Laughinglizard
    Member
    Posted 10 years ago #

    NuclearMoose had it right. My Javascript quicktags has a drop caps script included. Find it here...
    http://weblogtoolscollection.com/archives/2004/03/24/wordpress-javascript-quicktags/

  7. davidchait
    Member
    Posted 10 years ago #

    (the #036 is a dollar-sign, btw. Not sure why it does that -- tried both [code] and backtick, both do it... weird.)

  8. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    Hey, you can do drop-caps in CSS just fine. No need for hacks:
    http://www.google.com/search?q=drop+caps+css

  9. davidchait
    Member
    Posted 10 years ago #

    Except that it requires full CSS2 support, and even then as usual there are differences between browsers...
    Mine would also allow you to do custom effects like image-replacement for the characters (to use some cool, photoshopped caps). ;)
    -d

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.