Image alignleft
-
I am trying to float an image to the left and wrap some text around the image so the text is horizontally aligned with the image. Now this is easily achieved with giving the image a class of: alignleft
The image is then placed in a paragraph along with the first line of text which becomes an issue when viewing on smaller devices as I then want the text not to wrap including the first line. I have the following media query:
img.alignleft { float:none !important; margin-right:0; }
This works great for all the text apart from the first line as it sits in the same paragraph as the image. The obvious solution is to wrap a div around the image so it removes the paragraph but as I want my client to be able to achieve this I am stuck as I have to add the div using code which is too tricky for the client.
Any thoughts would really be appreciated?
- The topic ‘Image alignleft’ is closed to new replies.