To style a link by filetype in CSS you can use the following snippet.
Sample CSS
a[href$=".exe"] { background: url(icons/exe.png) left center no-repeat; padding-left: 50px; } a[href$=".rar"] { background: url(icons/rar.png) left center no-repeat; padding-left: 50px; } a[href$=".doc"] { background: url(icons/doc.png) left center no-repeat; padding-left: 50px; } a[href$=".pdf"] { background: url(icons/pdf.png) left center no-repeat; padding-left: 50px; } a[href$=".zip"] { background: url(icons/zip.png) left center no-repeat; padding-left: 50px; } a[href$=".html"] { background: url(icons/link.png) left center no-repeat; padding-left: 50px; }
RT @CodeSnippetsNET: How to style link by filetype in #CSS http://t.co/MZHk6QFBok #html #php #js #jquery #javascript
RT @CodeSnippetsNET: How to style link by filetype in #CSS http://t.co/MZHk6QFBok #html #php #js #jquery #javascript