2012-09-18 32 views
0

我想創建一個電子郵件界面。我想導入一張圖片,但是如果沒有cid我就無法做到。例如:HTML,即使即時使用CID,我該如何左對齊圖片?

工作得很好。但我似乎無法將文字放在圖片的左側。請看下面的代碼以獲得更好的理解!

<div style="background-color:black;"> 
<body style="font-color:white;"> 
    <h1><i>Airline Credits</i></h1> 
    </br> 
    </ul> 
    Dear [FullName],<br/> 
    Thank you for your <i>Airline Credits</i> redemption. Below is a summary of your order: 

    <b>Order Date:</b>[OrderDate]<br/> 
    <b>Description:</b>[ItemName] 
    <br/><b>Redemption Amount:</b>[CostInPoints] 
    <br/><b>Order Tracking Number:</b>[OrderNumber] 

    <br/><br/> 
    <b>Please note:</b> 
    If you did not make this request, please contact us immediately at [AirlinePhoneNumber]. Our Customer Service Representatives are available to help you. 

    <br/><br/> 
    Please read the terms and conditions for Airline Credits Redemptions at <a href="[WebSiteAddress]">[WebSiteAddress]</a> about how you are provided your redeemed items. To view your Airline Credits balance, please <a href="[EMLink]">click here</a> 
    <br/> 
    <img src=cid:AirlineCredits.jpg/> 
</body> 
</div> 
+1

是html-email的標記嗎?或者它在網頁上? –

回答

3

HTML電子郵件是痛苦 - 什麼也沒有固有的,而是因爲微軟決定使Outlook 2007,2010,和2013年使用Word的可怕的破碎和貧困的HTML渲染的實現(而Outlook 2003中使用IE的)。

Outlook有浮動框支持不佳,所以我建議在這種情況下。

無論如何,通常我是一個web標準的狂熱者 - 但在HTML電子郵件中並沒有真正似乎沒有問題,所以我只是說使用表,就像這樣:

<table border="0"> <!-- Tim Berners-Lee, forgive me, for I have sinned. --> 
    <tr> 
     <td> 
      <p>Please read the terms and conditions for Airline Credits Redemptions at <a href="[WebSiteAddress]">[WebSiteAddress]</a> about how you are provided your redeemed items. To view your Airline Credits balance, please <a href="[EMLink]">click here</a></p> 
     </td> 
     <td> <img src=cid:AirlineCredits.jpg /> </td> 
    </tr> 
</table> 

相對無痛苦,完成工作。

(並導致我死在裏面)。

+0

是的。表格是你應該在電子郵件中使用的東西。這是一個痛苦的**,但事情是這樣的。 – HerrSerker

相關問題