Style links depending on url or file format
While browsing at Forrst I came across this piece of CSS.
a[href^="http://"] { color: blue; } a[href^="mailto:"] { color: red; } a[href$=".pdf"] { color: green; } |
Styling links depending on their formats.
ajcates said:
For the sake of usability and consistency instead of changing the color on links based on their format I often times use this technique instead to add on little file icons.