Skip to content

Instantly share code, notes, and snippets.

@siongui
Created November 29, 2013 13:28
Show Gist options
  • Save siongui/7705693 to your computer and use it in GitHub Desktop.
Save siongui/7705693 to your computer and use it in GitHub Desktop.
little trick to show a file type icon for any links that point to a particular type of file From: https://plus.google.com/+DavidGilbertson/posts/DY4ktjxuYaV
a[href$=".pdf"] {
background: url(../img/pdf_icon_16x16.png) no-repeat;
padding-left: 20px;
}
...or if you don't want to use an icon, but do want to let your users know you're linking to a file:
a[href$=".pdf"]:after {
content: " (PDF)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment