July 17, 201313 yr Hi guys, How can I float a image to the left with text next to it and have it aligned properly? While using <h2> tag as a title in the text. So far without using divs for each part, the text appears higher than the image. <img src="images/quick-to-join.jpg" style="margin-right:10px; vertical-align:text-top; float:left;" /><h2>Lorem Ipsum...</h2> <p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered <span class="orange">alteration</span> in some form, by injected humour.<br /> <br /> <span class="orange">MORE</span><img src="images/arrow-blue.jpg" style="margin-left:5px; vertical-align:text-bottom"/></p>
July 17, 201313 yr Is there a reason you're using inline styles? Is this design for an email? I'd use divs for this mark up, but you could just add top padding to <h2>.
July 18, 201313 yr I have used an image from my PC; it is going well both image and text are equally aligned. However, if you have a problem try to-margin for text.
July 22, 201313 yr inline style sheet is the best way to do this. i personally use inline style sheet method for the same problem and finally i got solution for using this technique.
Create an account or sign in to comment