/ Published in: CSS

Style external, email, and pdf links using css3 attribute selectors.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* external links */ a[href^="http://"] { padding-right: 13px; background: url(external.gif) no-repeat center right; } /* emails */ a[href^="mailto:"] { padding-right: 20px; background: url(email.png) no-repeat center right; } /* pdfs */ a[href$=".pdf"] { padding-right: 18px; background: url(page_white_acrobat.png) no-repeat center right; }
URL: http://nealgrosskopf.com/files/css/style.css
Comments
