I came across this issue last night where my CSS would not affect the img tag for the following HTML:
<div class='container'>
<div id="grid"><img src='test.jpg' /></div>
</div>
The CSS was as follows:
#grid img { position:relative; top:75px; border:5px solid white; }
Everything should have been working fine, but when I viewed source on the uploaded CSS document, I found out a special character was being entered at the end of the previous line:
#grid p { float:right; font-size:34px; }​
#grid img { position:relative; top:75px; border:5px solid white; }
Highlighting the area and clicking backspace in my IDE fixed the issue. Was about to post question on here, so I thought I’d add the knowledge to save someone else the trouble.