147 lines
4.4 KiB
HTML
147 lines
4.4 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
"http://www.w3.org/TR/html4/loose.dtd">
|
|
<html lang="en">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<meta name="viewport" content="initial-scale=1.0"> <!-- So that mobile webkit will display zoomed in -->
|
|
<meta name="format-detection" content="telephone=no"> <!-- disable auto telephone linking in iOS -->
|
|
<title>Two Columns to Rows (Simple)</title>
|
|
<link rel="stylesheet" type="text/css" href="styles.css">
|
|
<link rel="stylesheet" type="text/css" href="responsive.css">
|
|
</head>
|
|
<body style="margin:0; padding:0;" bgcolor="#F0F0F0" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
|
|
|
<!-- 100% background wrapper (grey background) -->
|
|
<table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0" bgcolor="#F0F0F0">
|
|
<tr>
|
|
<td align="center" valign="top" bgcolor="#F0F0F0" style="background-color: #F0F0F0;">
|
|
|
|
<br>
|
|
|
|
<!-- 600px container (white background) -->
|
|
<table border="0" width="600" cellpadding="0" cellspacing="0" class="container">
|
|
<tr>
|
|
<td class="container-padding header" align="left">
|
|
Antwort v1.0
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="container-padding content" align="left">
|
|
<br>
|
|
<div class="title">Two Columns (simple)</div>
|
|
<br>
|
|
|
|
<div class="body-text">
|
|
This is an example of transforming two columns on desktop into rows on mobile.
|
|
<br><br>
|
|
</div>
|
|
|
|
<div class="hr"> </div>
|
|
<br>
|
|
|
|
<!-- example: two columns (simple) -->
|
|
|
|
<!--[if mso]>
|
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
|
<tr><td width="50%" valign="top"><![endif]-->
|
|
|
|
<table width="264" border="0" cellpadding="0" cellspacing="0" align="left" class="force-row">
|
|
<tr>
|
|
<td class="col" valign="top">
|
|
<strong>Herman Melville</strong>
|
|
<br><br>
|
|
It's worse than being in the whirled woods, the last day of the year! Who'd go climbing after chestnuts now? But there they go, all cursing, and here I don't.
|
|
<br><br>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<!--[if mso]></td><td width="50%" valign="top"><![endif]-->
|
|
|
|
<table width="264" border="0" cellpadding="0" cellspacing="0" align="right" class="force-row">
|
|
<tr>
|
|
<td class="col" valign="top">
|
|
<strong>I am Ishmael</strong>
|
|
<br><br>
|
|
White squalls? white whale, shirr! shirr! Here have I heard all their chat just now, and the white whale—shirr! shirr!—but spoken of once! and…
|
|
<br><br>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<!--[if mso]></td></tr></table><![endif]-->
|
|
|
|
|
|
<!--/ end example -->
|
|
|
|
<div class="hr" style="clear: both;"> </div>
|
|
<br>
|
|
|
|
<div class="subtitle">
|
|
Code Walkthrough
|
|
</div>
|
|
|
|
<div class="body-text">
|
|
<ol>
|
|
<li>
|
|
Create a columns container <code><table></code> just for Outlook using <code>if mso</code> conditionals.<br>
|
|
The container's <code><td></code>'s have a width of <code>50%.</code>
|
|
<br><br>
|
|
</li>
|
|
<li>
|
|
Wrap our columns in a <code><table></code> with a <strong>fixed width</strong> of <code>264px</code>.
|
|
<ul>
|
|
<li>
|
|
264px = (600 - 24*3) / 2 - container width minus margins divided by number of columns
|
|
</li>
|
|
<li>
|
|
First table is aligned left.
|
|
</li>
|
|
<li>
|
|
Second table is aligned right.
|
|
</li>
|
|
</ul>
|
|
<br>
|
|
</li>
|
|
<li>
|
|
Apply <code>clear: both;</code> to first element after our wrapper table.
|
|
</li>
|
|
</ol>
|
|
|
|
<br>
|
|
<em><small>Last updated: 10 October 2014</small></em>
|
|
</div>
|
|
|
|
<br>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="container-padding footer-text" align="left">
|
|
<br><br>
|
|
Sample Footer text: © 2014 Acme, Inc.
|
|
<br><br>
|
|
|
|
You are receiving this email because you opted in on our website. Update your <a href="#">email preferences</a> or <a href="#">unsubscribe</a>.
|
|
<br><br>
|
|
|
|
<strong>Acme, Inc.</strong><br>
|
|
<span class="ios-footer">
|
|
123 Main St.<br>
|
|
Springfield, MA 12345<br>
|
|
</span>
|
|
<a href="http://www.acme-inc.com">www.acme-inc.com</a><br>
|
|
|
|
<br><br>
|
|
|
|
</td>
|
|
</tr>
|
|
</table><!--/600px container -->
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table><!--/100% background wrapper-->
|
|
|
|
</body>
|
|
</html>
|