/ Published in: CSS
Style links depending on file format
Since CSS3 you can style links depending on some rules also called attribute selectors. This is extremely convenient if you have files in PDF, Zip among other and you want to display a small icon near it. With this technique you can do it without including an image on your link. This snippet shows a small icons next to your links telling the user if it is an external link, an email, a pdf, a zip or whatever you would like.
Since CSS3 you can style links depending on some rules also called attribute selectors. This is extremely convenient if you have files in PDF, Zip among other and you want to display a small icon near it. With this technique you can do it without including an image on your link. This snippet shows a small icons next to your links telling the user if it is an external link, an email, a pdf, a zip or whatever you would like.
URL: http://www.djavupixel.com/development/css-development/master-css3-ultimate-css-code-snippets/