Posted By

michaelx on 10/05/11


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vaughanj


Styling links by file type


 / Published in: CSS
 

URL: http://webexpedition18.com/articles/useful-css-snippets/

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

Report this snippet  

You need to login to post a comment.