|
|
I have an issue where I'm trying to send out an email with a stretched image for the background and text overlaying the image. The markup I'm using works fine in a browser (IE, Firefox, Opera) but the image shows in-line when I create the view and open it with Outlook 2007.
My.Settings.htmlContent:Code:Dim content As String = My.Settings.htmlContent Dim view As AlternateView = AlternateView.CreateAlternateViewFromString(content, Nothing, "text/html") Dim resource As New LinkedResource("C:\Temp\CustomerMailer\myImage.jpg", "image/jpeg") resource.ContentId = "blast" resource.TransferEncoding = Mime.TransferEncoding.Base64 view.LinkedResources.Add(resource)
If someone can point me in the right direction to stretch the background image and not inline it in an email it would be much appreciated. Thank you in advance.<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Sample HtmlView Email</title>
<style type="text/css">
html, body {margin:0; padding:0; width:100%; height:100%; overflow:hidden;}
body {font-family:verdana, arial, sans-serif; font-size:76%;}
#background{position:absolute; z-index:1; width:100%;}
#scroller {position:absolute; width:100%; height:100%; top:0; left:0; overflow:auto; z-index:2;}
#content {padding:10% 30% 10% 30%;}
p {line-height:1.8em; letter-spacing:0.1em; text-align:justify;}
</style>
</head>
<div>
<img id="background" src="cid:blast" alt="" title="" />
</div>
<div id="scroller">
<div id="content">
<p>Some email text</p>
<p>Some more text that is much longer. Some more text that is much longer. Some more text that is much longer.</p>
</div>
</div>
</body>
</html>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks