Q:

CSS selectors : styling link which contains img

As the title says -
Here I have a link which contains img tag:
<a href="#">
  <img src="somthng.jpg" />
</a>

I have to style this link, there is no class in the image or the link so don't suggest me to add a class. Further I don't want the styling of this link with any other link such as :
<a href="#">
  <div>...</div>
</a>

So I'm trying to trigger the link by css a img {...}, but that would style the image not the anchor.

A:

selectors? http://www.w3.org/TR/CSS2/selector.html
You could also use js to target the image file src and then use that to append a class to the link

