All Posts by Email, Once a Week

Media Temple logo

CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.

icons in between paragraph breaks

  • # January 13, 2010 at 6:41 pm

    Hello!!! My first ever css question!!!! :D
    How do I add a small icon in between paragraphs? I don’t want to add them to every single paragraph, just the ones which seem to be a little long (example shown in the attachment).

    Thanks in advance for any help!
    Louisa

    # January 14, 2010 at 5:10 am

    This reply has been reported for inappropriate content.

    Just add them as a centered image in your html markup wherever you need them.

    mat
    # January 14, 2010 at 5:13 am

    add style to your css:

    Code:
    p.icon {
    width: 100%;
    display: block;
    background: #fff url(‘../imgpath.jpg’) center top no-repeat;
    }

    Then in the HTML Apply:

    Code:

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

    This should more or less work!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed