Grow your CSS skills. Land your dream job.

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

    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.

*May or may not contain any actual "CSS" or "Tricks".