WordPress.org

Ready to get started?Download WordPress

Forums

Title post image repleacement? (3 posts)

  1. rbarona
    Member
    Posted 7 years ago #

    Hi guys!

    Sufring in the code of this page, I found something that I like too much and I need for my next website.

    I wna't to know hot to replace a text in a image, like this:

    <h2 class='fancy' style='background-image: url(/style/v3-head/hot+tags.png)'>Hot Tags</h2>

    The result is this: http://wordpress.org/style/v3-head/hot+tags.png

    I love it!!!

    How can I do it? Its a pluging or CSS hack?

    Thanks a lot for the responses

  2. Kafkaesqui

    Posted 7 years ago #

    It's just some CSS. Add the style attribute (with the background-image property) to the tag you want to affect. Then make sure to set up the text in it to not be shown.

    All of this can be handled through an addition to your stylesheet:

    h2.fancy {
    background-image: url(/style/v3-head/hot+tags.png);
    background-repeat: no-repeat;
    text-indent: -9000px;
    }

    The text-indent is a bit of a cheat (it throws the text *way* off the page display), but it'll work for this sort of thing.

  3. patcoll
    Member
    Posted 6 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic