如何将图像浮动到文本的右侧?

时间:2021-05-19 16:54:57

标签: html css-float

<table class="container" width="800" align="left" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top" class="headline" bgcolor="#f2fafd" style="padding: 15px 20px 5px 30px; border-left: 1px solid #dbc064; border-right: 1px solid #dbc064; font-family: Open Sans, sans-serif; font-size: 14px; line-height: 22px; color: #1E4286;">
      <h1 style="margin: color: #61B0BD; color: #61B0BD;" align="left" font-family:="open sans" color="#61B0BD" sans-serif;="" font-size:="25" 25px;="" line-height:="" 29px=""><strong style="text-align: left; color: #1e4286; font-size: 24px; float: left"> Offer PRECISION1<span class="sup">®</span> Lenses to All Patients Interested in Daily Disposables— Including Astigmats! </strong></h1> <img src="image/eblast toric advetorial precision1 p1-01.png"
        width="397" height="378" alt="" style="float: right;" />
      <p><strong>Aaron Luekenga, <br>
</strong> OD Heritage Valley Eyecare<br> Santa Paula, CA</p>
      <p><em>Dr. Luekenga is a paid consultant for Alcon.</em></p>

enter image description here

1 个答案:

答案 0 :(得分:0)

我不是 100% 确定这是您想要的样式,但我将图像向右对齐。 如果这不是你想要的,请给我更多细节,我可以修复它。

这是代码

     <table class="container" width="800" align="left" border="0" cellpadding="0" cellspacing="0">
<img src="image/eblast toric advetorial precision1 p1-01.png" width="397" height="378" alt="" style="float: ;"/>
    <tr>
    <td valign="top" class="headline" bgcolor="#f2fafd" style="padding: 15px 20px 5px 30px; border-left: 1px solid #dbc064; border-right: 1px solid #dbc064; font-family: Open Sans, sans-serif; font-size: 14px; line-height: 22px; color: #1E4286;">
        <h1 style="margin: color: #61B0BD; color: #61B0BD;" align="left" font-family:="open sans" color="#61B0BD" sans-serif;="" font-size:="25" 25px;="" line-height:="" 29px=""><strong style="text-align: left; color: #1e4286; font-size: 24px; float: left"> Offer PRECISION1<span class="sup">®</span> Lenses to All Patients<br> Interested in Daily Disposables— Including Astigmats! </strong></h1> 
      <br>
      <br>