3 ms·
For those who only care how it's done... a[href $='.pdf'] { padding-right: 18px; background: transparent url(icon_pdf.gif) no-repeat center
by tlrobinson 19y ago
For those who only care how it's done...
a[href $='.pdf'] {
padding-right: 18px;
background: transparent url(icon_pdf.gif) no-repeat center right;
}
a[href ^="mailto:"] {
padding-right: 20px;
background: transparent url(icon_mail.gif) no-repeat center right;
}
CSS can match the beginning or end of attributes ("href") of a certain tag ("a"). Pretty simple, but neat.