简体   繁体   中英

How do I center an image in a table in Outlook

What is the correct inline css to move text or an image center in Outlook. Any time I open it in a browser, it looks great but the bottom image and text always stay left in Outlook. Not sure what else to try. Any help is appreciated

 <table cellpadding="0" cellspacing="0" border="0" width="800" align="left">
     <table align="left" width="800px;">
         <tr width="800px">
             <td><img width="800px;" src="images/ArlingtonPic-edited.png"></td>
         </tr>  
     </table>

     <table align="left" width="800px;">
        <tr width="800px">
           <td width="800px" style="font-size:20px; margin-left: auto; 
               margin-right: auto; text-align: center; vertical-align: middle;">
               <strong>Arlington Concrete Floor Boxes</strong></td>
        </tr>
     </table>

     <table align="left" width="800px;">
        <tr width="800px">
           <td width="350px" style="font-size:16px; padding: -10px 10px 0 10px;">
              <p>Our NEW heavy-duty<strong>FLBC4502</strong>  4.5"<strong> concrete floor
                 box</strong> has more! <strong> <span style="color: red">SIX conduit hubs and FOUR plugs.</span></strong>
                 And the NEW FLBC4502LR leveling ring makes
                 installation easier than ever on our FLBC4500
                 and FLBC4502, and others concrete boxes. <br>
                 It is <em>REVERSIBLE!</em></p>
                 </ul>
           </td>

           <td width="350px" style="font-size:16px; padding: 0 10px;">
               <p>The screw holes on SIDE A fit all 4.5" boxes,
                  and accommodate our 6" round covers,
                  and most others on the market.
                  SIDE B features a second set of holes
                  that fit a cover with a 3-3/8" hole pattern.
                  These Arlington <strong>cover kits</strong> fit 
                  our concrete boxes. <br>
                  <em>That is convenience!</em></p>
           </td>
        </tr>
     </table>

     <table align="left"  width="800px;">                        
        <tr width="800px">
           <td width="800px" style="margin-left: auto; margin-
               right: auto; text-align: center; vertical-align: middle;">
               <img src="images/ArlingtonLogo.png">
           </td>
        </tr>
     </table>

On your table cell use following attributes:

<td valign="middle" align="center">...</td>

for vertical and horizontal align.

This short article may help you.

This will add image in center in outlook.

<table width="100%">
<tr>
<td align="center">
<img src="https://4de5ad3168da.png" align="middle" width="200" height="130">
</td>
</tr>
</table>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM