![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have started using attribute selectors targeting the extension of a file name to add an appropriate icon to a link. The idea is to visually indicate that the target is not a web page, as might be expected, but actually a possibly unexpected PDF or a MS Word document. Example a[href$=".pdf"] { background: url(images/pdf_icon.png) right center no-repeat; padding-right: 20px; } a[href$=".doc"] { background: url(images/doc_icon.png) right center no-repeat; padding-right: 20px; } In searching my own web pages, the only relevant file extensions I found were .pdf and .doc I will also be adding the OpenOffice .odt file extensions, since I expect to have links to these in future. Does anyone have any suggestions of other file extensions worth targeting? The only other one that occurs to me at the moment is .ppt for Powerpoint. |
#3
| |||
| |||
|
|
Gazing into my crystal ball I observed Eric Lindsay NOwebmasterSPAM (AT) ericlindsay (DOT) com> writing in news:NOwebmasterSPAM- 632001.08254621012009 (AT) freenews (DOT) iinet.net.au: In searching my own web pages, the only relevant file extensions I found were .pdf and .doc I will also be adding the OpenOffice .odt file extensions, since I expect to have links to these in future. Does anyone have any suggestions of other file extensions worth targeting? The only other one that occurs to me at the moment is .ppt for Powerpoint. Take a look what programs your browser opens, and that will give you a nice list. In Firefox: Tools, Applications Opera: Tools, Advanced, Downloads IE: Sorry, don't know - don't use it. |
![]() |
| Thread Tools | |
| Display Modes | |
| |