We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Posted By

neal_grosskopf on 03/04/08


Tagged

css CSS3


Versions (?)


Who likes this?

4 people have marked this snippet as a favorite

neal_grosskopf
SpinZ
SeanJA
gAmUssA


Style External, PDF, and Mailto links with CSS


Published in: CSS 


URL: http://www.nealgrosskopf.com/tech/thread.asp?pid=4

Style External, PDF, and Mailto links using CSS and a background image. For a great set of icons to choose from visit http://www.famfamfam.com/lab/icons/silk/.


  1. a[href^="http"] {
  2. padding-right: 15px;
  3. background: url(external-image.png) no-repeat center right;
  4. }
  5.  
  6. a[href^="mailto:"] {
  7. padding-right: 15px;
  8. background: url(email.png) no-repeat center right;
  9. }
  10.  
  11. a[href$=".pdf"] {
  12. padding-right: 15px;
  13. background: url(pdf.png) no-repeat center right;
  14. }

Report this snippet 

You need to login to post a comment.