Tuesday, 13 August 2013

Making a[href$=".xyz"] not display when contains

Making a[href$=".xyz"] not display when contains

I have many hyperlinks like:
<a href="file.pdf">File</a>
and I use CSS to suffix the word PDF after each one of these links as
follows:
a[href$=".pdf"]:after {
content: "(pdf)";
font-size: 10px;
color: #666;
padding-left: 5px;
vertical-align: 6%;
}
This works great for text hyperlinks but I do not want "(pdf)" to display
for hyperlinked images such as:
<a href="file.pdf"><img src="" alt=""></a>
Any suggestions here?

No comments:

Post a Comment