Forum Moderators: open
TIA
CSS
a.more {
padding-left: 18px; /* set to width of your icon+2px
background: url("icon.gif") no-repeat left;
} HTML
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam aliquet, augue in condimentum tristique, nisl ligula tempus turpis, feugiat pellentesque lectus wisi ut tortor. Sed lacus. Ut quis quam quis est ullamcorper luctus. Cras auctor egestas neque. Ut vestibulum tristique dui. Cras eu diam. [b]<a class="more">More info</a>[/b] Quisque scelerisque purus ut pede. In massa mi, rhoncus at, suscipit et, dictum in, orci. Nulla ligula dui, aliquam eget, aliquet quis, egestas in, est. Praesent rhoncus imperdiet turpis. Curabitur euismod. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Ut ornare lorem id dolor. Aenean eleifend feugiat pede. Suspendisse euismod.</p>
But i did mess up on the code. I didn't test it. :)
Should be like this:
CSS
a.more {
padding-left: 18px; /* set to width of your icon+2px */
background: url("icon.gif") no-repeat left;
} HTML
Cras eu diam. <a class="more" href="">More info</a> Quisque scelerisque purus ut pede. - Forgot to close the comment in CSS
- Forgot to add href="" to the link
There is a downside to this. IE has a bug. If your anchor text wraps on a new line, it will messup the icon. It will display it on the right side of the text block.
I'm in favor of a simple text link which says "More Info..." (Note the ellipsis!) No reason to use a graphic when simple text will be perfect.
vkaryl
That's normally what I would do, but most of these links are in the middle of a paragraph of text and I wanted a physically small way of highlighting them.