I have designed an email using a template from github. It works fine in every email client except for www.outlook.com and outlook 2013. I am using a market research program named Confirmit to send my emails.
I am trying to give my button a static width because it looks really weird in outlook 2013. Also, I am trying to not let my email align to the left in outlook.com but let it center like it does on my other devices(iPad, Mac, phone). Any suggestions?
note: ^Aanhef^ and ^slink^ are variables.
I have ^slink^, which stands for surveylink, set up as: <p></p><div class="btn-first">Aliquam vel bebendum!<p></p>
This is how the email looks in outlook 2013 (button not static and way to big). http://i60.tinypic.com/wmbcax.png (I know I don't have enough rep but this makes it much easier for you to help me!)
This is the code I have:
<style>
/* -------------------------------------
GLOBAL
------------------------------------- */
* {
margin: 0;
padding: 0;
font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
font-size: 100%;
line-height: 1.6;
}
img {
max-width: 100%;
}
body {
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: none;
width: 100%!important;
height: 100%;
}
/* -------------------------------------
ELEMENTS
------------------------------------- */
a {
color: #348eda;
}
.btn-first {
border: 1px solid rgb(30, 54, 80);
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px; color: rgb(255, 255, 255);
display: inline-block;
font-family: sans-serif;
font-size: 13px;
font-weight: bold;
line-height: 40px;
line-width: 30%;
text-align: center;
text-decoration: none;
max-width: 300px;
max-height: 40px;
background-color: rgb(86, 12, 112);
}
.btn-primary {
text-decoration: none;
color: #FFF;
background-color: #3C175C;
border: solid #3C175C;
border-width: 10px 20px;
line-height: 2;
font-weight: bold;
margin-right: 10px;
text-align: center;
cursor: pointer;
display: inline-block;
border-radius: 25px;
}
.btn-secondary {
text-decoration: none;
color: #FFF;
background-color: #aaa;
border: solid #aaa;
border-width: 10px 20px;
line-height: 2;
font-weight: bold;
margin-right: 10px;
text-align: center;
cursor: pointer;
display: inline-block;
border-radius: 25px;
}
.last {
margin-bottom: 0;
}
.first {
margin-top: 0;
}
.padding {
padding: 10px 0;
}
/* -------------------------------------
BODY
------------------------------------- */
table.body-wrap {
width: 100%;
padding: 20px;
}
table.body-wrap .container {
border: 2px solid #f0f0f0;
}
/* -------------------------------------
FOOTER
------------------------------------- */
table.footer-wrap {
width: 100%;
clear: both!important;
}
.footer-wrap .container p {
font-size: 12px;
color: #666;
}
table.footer-wrap a {
color: #999;
}
/* -------------------------------------
TYPOGRAPHY
------------------------------------- */
h1, h2, h3 {
font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
line-height: 1.1;
margin-bottom: 15px;
color: #3C175C;
margin: 40px 0 10px;
line-height: 1.2;
font-weight: 200;
}
h1 {
font-size: 36px;
}
h2 {
font-size: 28px;
}
h3 {
font-size: 22px;
}
p, ul, ol {
margin-bottom: 10px;
font-weight: normal;
font-size: 14px;
}
ul li, ol li {
margin-left: 5px;
list-style-position: inside;
}
/* ---------------------------------------------------
RESPONSIVENESS
Nuke it from orbit. It's the only way to be sure.
------------------------------------------------------ */
/* Set a max-width, and make it display as block so it will automatically stretch to that width, but will also shrink down on a phone or something */
.container {
display: block!important;
max-width: 300px!important;
margin: 0 auto!important; /* makes it centered */
clear: both!important;
}
/* Set the padding on the td rather than the div for Outlook compatibility */
.body-wrap .container {
padding: 20px;
}
/* This should also be a block element, so that it will fill 100% of the .container */
.content {
max-width: 600px;
margin: 0 auto;
display: block;
}
/* Let's make sure tables in the content area are 100% wide */
.content table {
width: 100%;
}
</style>
<font face="calibri">
<table class="body-wrap">
<tbody><tr>
<td></td>
<td class="container" bgcolor="#ffffff">
<div class="content">
<table>
<tbody><tr>
<td><br/>
<center><img src="http://www.zbrastudios.com/wp-content/uploads/2013/02/Lorem-Ipsum_2-14-13.jpg"/></center>
<h1><b>Uitnodiging</b></h1><p></p>
<p>^Aanhef^,</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque in pellentesque augue
Sed vehicula scelerisque massa, a accumsan lectus laoreet eget. Praesent et ligula malesuada, elementum nisi ac, laoreet enim.</p>
<p>Donec feugiat nibh at tortor pellentesque iaculis. Vestibulum at eros egestas purus sagittis cursus posuere a nibh. Mauris eleifend dignissim ullamcorper</p>
<p>Curabitur venenatis ac lectus nec tincidunt. Pellentesque at sapien congue, blandit ipsum ut, euismod dolor. Morbi in tincidunt augue.</p>
<p>Duis dui sapien, volutpat at pulvinar ac, cursus ac metus. Cras gravida cursus mi sit amet imperdiet.</p>
<table>
<tbody>
<tr><td class="padding">
^SLINK^
</td></tr><tr>
</tr>
</tbody></table><br/>
<p>Donec vel porta eros. Nam viverra erat non lorem auctor,</p>
<p>Donec nec gravida ipsum.,
</p><p>Donec vel<br/>Nam viverra erat.</p>
<p><i>Aliquam vel bibendum elit. Morbi bibendum bibendum ex. Sed mollis, quam in pulvinar luctus, ipsum purus dignissim ante, at rutrum diam tortor sed libero. Donec nec gravida ipsum.
<a href="mailto:test@example.com">test@example.com</a>.</i></p>
</td>
</tr>
</tbody></table>
</div>
</td>
<td></td>
</tr>
</tbody></table>
<table class="footer-wrap">
<tbody><tr>
<td></td>
<td class="container">
<div class="content">
<table>
<tbody><tr>
<td align="center">
<p>Lorem ipsum sapien: <br/><a href="#">
<img src="http://www.zbrastudios.com/wp-content/uploads/2013/02/Lorem-Ipsum_2-14-13.jpg" alt="Customeyes" height="23" width="150"/></a>
</p><p></p>
</td>
</tr>
</tbody></table>
</div>
</td>
<td></td>
</tr>
</tbody></table>
</font>