Possible since CSS version 2.1, the anchor element can be referred to depending on the last few characters of the href attribute, hence links with different extensions can have different styles.
- a[href$=‘.docx’]
- {
- display: inline-block;
- padding-left: 20px;
- line-height: 18px;
- background: transparent url(Images/DocxIcon.png) center left no-repeat;
- }