Hi
I have a number of tables containing links to various types of documents (docs, pdfs, xls's, ...):
Now I want to apply consitional styling.
When I use
I get my little pdf icon as background. But I really want to have the little icon as list-style-image, something like
So, if there is a list item containing a <a> that contains a <href> ending in ".pdf", I want the list-style-image to be myico_pdf.gif.
But my browser doesn't understand me. Where do I go wrong?
I have a number of tables containing links to various types of documents (docs, pdfs, xls's, ...):
| Code: |
| <td width="25%"><ul>
<li ><a href="test.pdf">Test1.pdf</a></li> <li ><a href="test.doc">Test2.doc</a></li> <li ><a href="test.xls">Test3.xls</a></li> </ul></td> |
When I use
| Code: |
| a[href $=".pdf"] {
background-image: url(Images/myico_PDF.gif); background-repeat: no-repeat; padding-left: 10px;} |
| Code: |
| ul li[a[href $=".pdf"]] {
list-style: outside url(/Images/myico_PDF.gif);} |
So, if there is a list item containing a <a> that contains a <href> ending in ".pdf", I want the list-style-image to be myico_pdf.gif.
But my browser doesn't understand me. Where do I go wrong?
