c.hunter90 c.hunter90 - 5 months ago 11
HTML Question

HTML Align text to right of image?

I am looking to move the "Text" to the right of the image, when I align the image tag and use align="left" it brings all text to the right of the image but I want the caption to stay below. I think I may be missing an addition tag to do this. Any suggestions? This is in an email.



<figure style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px;">
<img src="http://image.comm.housingpartnership.net/lib/fe9513727667017c70/m/1/Robin+Hughes.jpg" title="Robin Hughes" alt="Robin Hughes" border="0" hspace="0" vspace="0" mdid="ff508d18-ad83-4b37-a12c-f8249c7917dc" width="160" height="240" style="width: 160px; height: 240px;" />
<figcaption>Caption Here</figcaption>
</figure>
<p id="text-placeholder" style="margin-top: 0px; margin-bottom: 0px;">
<font face="Arial">
<span style="font-size: 13px;">
Text
</span>
</font>
</p>




BDD BDD
Answer

Add float: left to your figure tag

<figure style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; float: left;">
 <img src="http://image.comm.housingpartnership.net/lib/fe9513727667017c70/m/1/Robin+Hughes.jpg" title="Robin Hughes" alt="Robin Hughes" border="0" hspace="0" vspace="0" mdid="ff508d18-ad83-4b37-a12c-f8249c7917dc" width="160"  height="240" style="width: 160px; height: 240px;" />
 <figcaption>Caption Here</figcaption>
</figure>
<p id="text-placeholder" style="margin-top: 0px; margin-bottom: 0px;">
 <font face="Arial">
  <span style="font-size: 13px; display: inline;">
   Text
  </span>
 </font>
</p>