I want this layout where I have a rectangular box. And inside the box on the left there is a text and on the right there is an image. This looks fine in the browser, but when sent out as an html email, in outlook the float right doesn't seem to work. It puts the image in the next line under the text. Any ideas on how to make this work? (I am trying to avoid using tables.)
<div style="width: 100%;border-style:solid;overflow: hidden;"> <span style="float: left;"> <h3> Your appointment Details</h3> </span> <span style="float: right;"> <img src="someImage"/> </span> </div>
Outlook 2007 and 2010 does not recognise floats on images (along with a whole lot of other stuff).
especially for supporting Outlook. Most Outlook versions don't support the box model or things like flexbox, CSS Grid, and floats. This lack of CSS support makes it hard to use semantic HTML to build email layouts that display properly in Outlook.
Outlook sometimes skews HTML emails because all versions since Outlook 2007 use Microsoft Word to render HTML/CSS. Because of this, an email display may look slightly off in newer versions of Outlook from what you initially design and preview in Klaviyo.
Very late to the conversation, but here is how to "float" in html email using align=""
instead.
Example here
Also, if you are looking for resources on html email (I assume you are as the answer you marked correct is very general), here is a huge list of resources.
This is a really good guide from Mail Chimp on Coding for HTML Emails:
http://kb.mailchimp.com/article/how-to-code-html-emails
Some basic tips:
Basically code your emails as if it was roughly 2003.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With