I've had a problem I can only solve in one way by setting up a different div class for each image on the website so I hope there is an easier solution.
I use the responsive method of designing for mobiile.
I often use floated images alongside of paragraphs. However on mobile devices they usually have text along the side or are not centered. I've tried multiple solutions I've seen on the net but nothing seems to have worked unless you set up a div class for each image, which is not a good idea when the site is image intensive and images are all different sizes.
Can anyone advise me on how to set this up so it applies to all images on the site?
Here is the method I'm currently using that works when applying a class to each image.
--------CSS:
nameimg {
float:left;
width:170px;
margin-right:12px; }
---------MEDIA QUERY: Max 320:
.nameimg { float:none; display:block; margin:0 auto; }
-------HTML:
<div class="nameimg">
<img src="images/name.jpg" alt="">
</div>