Though the W3C even gives it as an example Show archive.org snapshot , no browser actually supports this CSS:
img:before {
content: "something";
}
Browsers will simply not render anything when doing that on images (Fun fact: It worked in an older version of Opera but got dropped).\
The same applies to the :after
pseudo-element.
This makes me sad.
You can try using jQuery instead.
Posted by Arne Hartherz to makandra dev (2012-05-10 21:03)