I'm creating an email template. All I want is a regular float for three boxes:
Simplified HTML:
<center>
<div style="width: 100%; max-width: 480px; border-collapse: collapse; margin:0; padding:0; border-spacing: 0;" cellpadding="0" cellspacing="0">
<div class="main" align="left" width="300" style="display: block; float: left; width: 300px; background: red; border-collapse: collapse; margin:0; padding:0; border-spacing: 0;" cellpadding="0" cellspacing="0">
</div>
<div class="half" align="left" width="180" style="display: block; float: left; width: 180px; height: 100px; background: green; border-collapse: collapse; margin:0; padding:0; border-spacing: 0;" cellpadding="0" cellspacing="0">
</div>
<div class="half" align="left" width="180" style="display: block; float: left; width: 180px; height: 100px; background: blue; border-collapse: collapse; margin:0; padding:0; border-spacing: 0;" cellpadding="0" cellspacing="0">
</div>
</div>
</center>
CSS:
@media screen and (max-width: 480px) {
.main {
width:100% !important;
}
.half {
width:45% !important;
}
.third {
width:33% !important;
}
.third:last-child {
width:34% !important;
}
}
This is working perfectly on iOS and android clients. I just can't figure out how to make this float and the widths work in outlook (it doensn't need to be responsive there, but i should display the desktop view correctly).