Posted By

clark-kim on 04/13/11


Tagged

css file type


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

ak3n
clark-kim


file types in CSS


 / Published in: CSS
 

  1. a[href^="http:"] {
  2. display:inline-block;
  3. padding-right:14px;
  4. background:transparent url(/Images/ExternalLink.gif) center right no-repeat;
  5. }
  6.  
  7. a[href^="mailto:"] {
  8. display:inline-block;
  9. padding-left:20px;
  10. line-height:18px;
  11. background:transparent url(/Images/MailTo.gif) center left no-repeat;
  12. }
  13.  
  14. a[href$='.pdf'] {
  15. display:inline-block;
  16. padding-left:20px;
  17. line-height:18px;
  18. background:transparent url(/Images/PDFIcon.gif) center left no-repeat;
  19. }
  20.  
  21. a[href$='.swf'], a[href$='.fla'], a[href$='.swd'] {
  22. display:inline-block;
  23. padding-left:20px;
  24. line-height:18px;
  25. background:transparent url(/Images/FlashIcon.gif) center left no-repeat;
  26. }
  27.  
  28. a[href$='.xls'], a[href$='.csv'], a[href$='.xlt'], a[href$='.xlw'] {
  29. display:inline-block;
  30. padding-left:20px;
  31. line-height:18px;
  32. background:transparent url(/Images/ExcelIcon.gif) center left no-repeat;
  33. }
  34.  
  35. a[href$='.ppt'], a[href$='.pps'] {
  36. display:inline-block;
  37. padding-left:20px;
  38. line-height:18px;
  39. background:transparent url(/Images/PowerPointIcon.gif) center left no-repeat;
  40. }
  41.  
  42. a[href$='.doc'], a[href$='.rtf'], a[href$='.txt'], a[href$='.wps'] {
  43. display:inline-block;
  44. padding-left:20px;
  45. line-height:18px;
  46. background:transparent url(/Images/WordDocIcon.gif) center left no-repeat;
  47. }
  48.  
  49. a[href$='.zip'], a[href$='.gzip'], a[href$='.rar'] {
  50. display:inline-block;
  51. padding-left:20px;
  52. line-height:18px;
  53. background:transparent url(/Images/ZIPIcon.gif) center left no-repeat;
  54. }

Report this snippet  

You need to login to post a comment.