width: 90%; /* Or whatever proportion you want it to fill on small screens */
max-width: 375px; /* The actual image width in pixels */
For the image:-
width: 100%;
height: auto;
Also lose the padding on the image padding: 0; but only put that in the media query, where the image goes on top, to keep the padding in the wide view.
Sorry, for some reason I ignored the second link on the OP.
If the images have different size and positions, then maybe their containers should have different classes. The settings I gave were specifically for those images on the first page, beside the text, not a solution for any image on any page.
The strange thing is, it should not be too hard to set up some css to make all images responsive, but for some reason I can’t work out, the usual methods are not working on your pages. I am having to explicitly stare the images pixel width in the max-width, which should not be necessary.
Normally something like:-
One thing in the css that is bugging me, and could be confusing things, you have 2 selectors targeting the same elements:
.row .img-container img {}
.row img {}
One gets overridden in the query, but the other does not, I think that creates a conflict.
I’m not asking you to put both in the query, but remove one altogether, or combine them into a single selector.
Sam, please permit me to add to your observation. Based on past experience with Qim, and after looking at his new CSS, I wrote this up yesterday. Some points may have been covered already. I am posting it now For Your Info only. I’m not sticking around.
Unnecessary negative margins-top.
Unnecessary repetitions of properties.
Unnecessary declarations of {width:100%} on block objects.
Why are the images floated?
Use a proper float clearing mechanism. Not a div with {clear:both}.
Too may IDs. Some (most) should be classes.
One should NEVER have two IDs in a selector.
You are setting yourself up for specificity problems already.
I don’t like that idea, it defeats the object of having css and makes more work. Best to have just one good css than lots of iffy ones.
ronpat is right, you do need to re-think how css is done and start doing it the right way, or you will forever be running into these problems.
I placed the code you posted above in the media query @720, minus the ID for #side as it no longer exists after the first media quesry, but the images are still the same
Yes, BUT (and this is not JUST because of the ID), one must always be aware of, pay attention to, consider the possibiltiy of, specificity issues when writing CSS.
ID’s are very “weighty”. Can only be overriden with the !important modifier or by piling on more IDs. Apply styles to/thru IDs very sparingly. Apply styles primarily via classes.