Display the file type as an image on a linkTag(s): HTML/CSS
<style>
a[href$='.pdf'] {
display:inline-block;
padding-right:20px;
line-height:18px;
background:transparent url(../images/pdf.gif) center right no-repeat;
}
</style>
It looks like
The $ operator means "ends with".
The ^ operator means starts with, so it's possible to detect "http:" or "mailto:" link and display special icon!
<style>
a[href^="mailto:"] {
display:inline-block;
padding-right:20px;
background:transparent url(../images/link.jpg) center right no-repeat;
}
</style>
It looks like
See this interesting article more infos on the subject.
mail_outline
Send comment, question or suggestion to howto@rgagnon.com
Send comment, question or suggestion to howto@rgagnon.com