The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › Other › For tag you can Style links depending on file format
Style links depending on file format
/* external links */ a[href^=”http://”%5D{ padding-right: 20px; background: url(external.gif) no-repeat center right; }
/* emails */ a[href^=”mailto:”]{ padding-right: 20px; background: url(email.png) no-repeat center right; }
/* pdfs */ a[href$=”.pdf”]{ padding-right: 20px; background: url(pdf.png) no-repeat center right; }
@kunjan
Thank you. If you have a snippet to submit, check here https://css-tricks.com/snippets/ first, as it may be already known.