Posted By

alp on 02/14/11


Tagged

file-type


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

NyX
maltem
stonetatara


Styling Links by File Type


 / Published in: CSS
 

  1. /* external links */
  2. a[href^="http://"]
  3. {
  4. padding-right: 13px;
  5. background: url(external.gif) no-repeat center right;
  6. }
  7. /* emails */
  8. a[href^="mailto:"]
  9. {
  10. padding-right: 20px;
  11. background: url(email.png) no-repeat center right;
  12. }
  13. /* pdfs */
  14. a[href$=".pdf"]
  15. {
  16. padding-right: 18px;
  17. background: url(acrobat.png) no-repeat center right;
  18. }

Report this snippet  

You need to login to post a comment.