Все ответы, приведенные до сих пор, являются правильными, но, возможно, объяснение того, что не так, поможет.
Хотя div.img img { }
повлияет на img
элементы, содержащиеся в <div class="img">
элементах, вот некоторые элементы, на которые это не повлияет:
<body>
<img src="klematis4_small.jpg" alt="Klematis"><br>
This image is not contained in a div, therefore it cannot possibly be
contained in a div of the class "img" and is therefore unaffected.
<div>
<img src="klematis4_small.jpg" alt="Klematis"><br>
This img element is in a div, but the div is not of the class "img",
so the img element is unaffected.
</div>
<div id="img">
<img src="klematis4_small.jpg" alt="Klematis"><br>
This img is contained within a div that has an ID of "img", but it is
also not of the class "img" and is therefore unaffected.
</div>
</body>