The class is .imagelink.
Your CSS doesn't work because it is trying to apply the styles to the <img> tag, not the <a> tag. In other words, the child element of the <a> tag. To my knowledge, there is not a parent selector for css (only sibling and child).
You could use Javascript, however it would probably be overkill. But if you had
jQuery on your page(s), the rule would be simple:
- Code: Select all
$("img").parent("a").addClass("imagelink");
Hope that helps.