How to target a specific <img> element of a div in CSS?
css, html
Solution
You can add a class to the images OR
.foo img:nth-child(2) { css here }
or
.foo img:first-child { css here }
.foo img:last-child { css here }
Problem
I've a code of some what like this: ``` <div id="foo"> <img src="bar.png" align="right"> <img src="cat.png" align="right"> </div> ``` Now my question is how do I target a specific image in CSS when having the above code?