If you use the Ask for help button it is easier to see exactly what code you have. Or edit your post and use the code formatting, post all the code.
BTW, This is how I read your code (might just be a mistake):
curly bracket img max-width: 100%; display: block; height: auto; curly bracket
{ img
max-width: 100%;
display: block;
height: auto;
}
It should be:
img {
..CSS
}