As seen in the attached, some results paragraphs do not "conform" to what seems to be the "standard" specification for width (visible from results paragraph at top of image.
How can we control (limit) the overall width of the table to prevent the oversize table that was generated for "productdata.js" ?
Also, the left-side box with icon and "fit" factor is specified in the header with width = 100px, but the oversize table/paragraph seems to have overriden this and reduced the width to the width of the icon plus margin. Is there any way to prevent that from happening ?
The current contents of the paragraph CSS is:
<table style="background-color: #AFAFAF; width: 850px;"
<!-- <table class="parspec" style="background-color: #AFAFAF;" -->
border-style="none" border-color:="" border="0">
<tbody>
<tr>
<td style="width: 100px; text-align: center;
background-color: #0F0F0F;"
rowspan="4" >
<a class="thumbnail" href="#">
<img src="%I" width="64px" height="auto"> <!-- set width of thumbnail -->
<span>
<img src="%U">
</span>
</a>
<p style="font-family: sans-serif; color: #4F9F4F;"><b>%R</b></p>
</td>
<td style="vertical-align: top;"><br>
<th
style="font-family: sans-serif; color: #DFDFDF;
background-color: #000000; text-align: left;"
colspan="3" >
%T</th>
</td>
</tr>
<tr>
<td style="vertical-align: top; "></td>
<td style="font-family: sans-serif; text-align: center;
background-color: #000000; color: #CFCF4F;">
<b><font size=2>%M</font></b></td>
<td style="font-family: sans-serif; text-align: center;
background-color: #000000; color: #CFCF4F;">
<b><font size=2>%D</font></b></td>
<td style="font-family: sans-serif; text-align: right;
background-color: #000000; color: #CFCF4F;">
<b><font size=2>%S</font></b></td>
</tr>
<tr style="font-family: sans-serif;" 8="">
<td style="vertical-align: top; "></td>
<td class="snippet" colspan="3">
%A</td>
</tr>
<tr style="font-family: sans-serif; color: #9F;">
<td style="vertical-align: top; "></td>
<td style="background-color: #000000; color: #BFBFEF;"
colspan="3">
<b><font size=2>%U</font></b><br>
<span style="color: #BFBFFF">%L </span></td>
</tr>
</tbody>
</table>
<br>
<br>
The current contents of the header CSS is:
<style type="text/css">
body {
width: 1000px;
color: #CFCFCF;
background-color: #1F1F1F;
}
a:link {
color: yellow;
background-color: transparent;
text-decoration: none;
}
a:visited {
color: green;
background-color: transparent;
text-decoration: none;
}
a:hover {
color: orange;
background-color: transparent;
font-weight: bold;
text-decoration: underline;
}
a:active {
color: red;
background-color: transparent;
text-decoration: underline;
}
.snippet{
background-color: #000000;
color: #AFAFDF;
}
.thumbnail {
display:block;
position:relative;
padding: 4px;
width: auto; /* set width of thumbnail image in 'paragraph' code - not here */
border:none;
z-index:0;
}
.thumbnail:hover {
border:none;
background-color: transparent;
z-index: 50;
}
.thumbnail span {
position: absolute;
left: -9999px;
visibility: hidden;
}
.thumbnail span img {
max-width:256px; /* set 'large image' max width/height - advise keeping these */
max-height:256px; /* the same to avoid inadvertently changing the aspect ratio */
width:auto; /* leave set to auto */
height:auto; /* leave set to auto */
background-color: gray;
padding: 1px;
border: 1px solid black;
}
.thumbnail:hover span {
visibility: visible;
top: 4px; /* top/left positions 'large image' relative to top left */
left: 88px; /* of parent thumbnail (plus padding) */
}
</style>
After discussions with the developer for recoll, it has been determined that the problem was not with the customizations that I was attempting to apply.
The root of the problem was in fact a bug in the recoll code.
I can't seem to get media queries to work - at least for the one relevant style which needs to work - padding for the table-wrapper class. The padding set inline always wins.
I believe I need to have !important set for the media query so I do have that.
Media queries are at the top of the html
This is at the top of the html - <meta name="viewport" content="width=device-width">
The rest of the styles are inline / done by an app.
Anyone know what I might be missing?
https://codepen.io/lg00/pen/LvrXVY
<html xmlns="http://www.w3.org/1999/xhtml">
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<style>
/* Responsive */
#media screen and (max-width: 700px) {
.table-wrapper {
width: 100% !important;
margin-top: 0px !important;
border-radius: 0px !important;
padding: 5px 15px !important;
}
.header {
border-radius: 0px !important;
}
.header-title {
padding-left: 20px !important;
padding-right: 20px !important;
}
.header-title h1 {
font-size: 25px !important;
}
}
</style>
<div class="email-wrapper" style="background-color:#F5F6F7">
<table width="100%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<!-- PADDING SET HERE -->
<table cellpadding="0" cellspacing="0" class="table-wrapper" style="margin:auto; margin-top:50px; background-color:#fff; padding:64px 100px">
<tbody>
<tr>
<td class="container header" style="background-repeat:no-repeat; border-top-left-radius:6px; border-top-right-radius:6px; text-align:center; color:#000; padding-bottom:32px; display:block !important; margin:0 auto !important; clear:both !important">
<div class="header-title" style="font-weight:bold">Test</div>
</td>
</tr>
<tr>
<td class="content" style="border-bottom-left-radius:6px; border-bottom-right-radius:6px; margin:0 auto !important; clear:both !important">
<div class="header-title" style="color:#000; text-align:center">
<h1 style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif; margin-bottom:15px; color:#47505E; margin:0px 0 10px; line-height:1.2; font-weight:200; line-height:45px; font-weight:bold; margin-bottom:30px; font-size:28px; line-height:40px; margin-bottom:32px; font-weight:400; color:#000; padding-top:0px">Test The Length of the Title - Will it Wrap</h1>
</div>
<table width="100%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="text-center" style="text-align:center">
Test
</td>
</tr>
</tbody>
</table>
<table class="data-table bordered" width="100%" cellpadding="0" cellspacing="0" style="padding-top:32px; padding-bottom:32px; border-top:1px solid #DBDBDB; border-bottom:1px solid #DBDBDB">
<tbody>
<tr>
<td class="data-table-title" style="letter-spacing:0.6px; padding-top:5px; padding-bottom:5px; font-weight:bold; font-size:20px; padding-top:0px">Test</td>
</tr>
<tr>
<td style="letter-spacing:0.6px; padding-top:5px; padding-bottom:5px">Test</td>
<td class="text-right" style="text-align:right; letter-spacing:0.6px; padding-top:5px; padding-bottom:5px">Test</td>
</tr>
<tr class="bordered" style="border-top:1px solid #DBDBDB; border-bottom:1px solid #DBDBDB">
<td style="letter-spacing:0.6px; padding-top:5px; padding-bottom:5px; border-top:1px solid #DBDBDB">Test</td>
<td class="text-right" style="text-align:right; letter-spacing:0.6px; padding-top:5px; padding-bottom:5px; border-top:1px solid #DBDBDB">test</td>
</tr>
</tbody>
</table>
<table class="data-table" width="100%" cellpadding="0" cellspacing="0" style="padding-top:32px; padding-bottom:32px">
<tbody>
<tr>
<td style="letter-spacing:0.6px; padding-top:5px; padding-bottom:5px; vertical-align: top; ">
<p style="margin-top: 0px; ">
<span class="bold" style="font-weight:bold">Test</span><br>
test<br>
</p>
</td>
<td style="letter-spacing:0.6px; padding-top:5px; padding-bottom:5px; width: 20%"></td>
<td style="letter-spacing:0.6px; padding-top:5px; padding-bottom:5px; vertical-align: top; ">
<p style="margin-top: 0px; ">
<span class="bold" style="font-weight:bold">Test2</span><br>
</p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<div class="footer" style="width:100%; text-align:center; clear:both !important">
<p class="text-center" style="text-align:center; font-size:12px; color:#666">Test</p>
</div>
<br>
</td>
</tr>
</tbody>
</table>
</div>
It is a specificity issue in your media queries. Move .header-title above .table-wrapper since the padding is overriding what is being set in .table-wrapper
.header-title {
padding-left: 20px !important;
padding-right: 20px !important;
}
.table-wrapper {
width: 100% !important;
margin-top: 0px !important;
border-radius: 0px !important;
padding: 5px 15px !important;
}
.header {
border-radius: 0px !important;
}
Change your css to this, I hope it will work.
<style>
//Default styling
.table-wrapper {
width: 50%;
margin-top: 0px;
border-radius: 0px;
padding: 5px 15px;
}
/* Responsive */
#media screen and (max-width: 700px) {
.table-wrapper {
width: 100%;
margin-top: 0px;
border-radius: 0px;
padding: 5px 15px;
}
.header {
border-radius: 0px;
}
.header-title {
padding-left: 20px;
padding-right: 20px;
}
.header-title h1 {
font-size: 25px;
}
}
</style>
Please check the CSS specificity, as you said the in-line style is the most specific selector and "wins".
CSS specificity:
Inline Style
ID, Class
Pseudo-class, atributes
Elements, pseudo-element
I'm trying to create an HTML Email with a table, and from what I've been reading, my TD, TR, and TABLEs need to be display:block in order to work, be responsive etc. However, when I put the cells in the document they stack instead of appearing linearly.
Sorry, it's so long. I've been playing with different solutions to try to get this "responsive" thing to work for this email, but i'm a bit stumped.
/* Basics */
body {
Margin: 0 !important;
padding: 0;
background-color: #ffffff;
}
table {
border-spacing: 0;
}
td {
padding: 0;
}
img {
border: 0;
}
div[style*="margin: 16px 0"] {
Margin:0 !important;
}
.wrapper {
width: 100%;
table-layout: fixed;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
.webkit {
max-width: 600px;
Margin: 0 auto;
}
table[class="magic"],
table[class="magic"] tbody,
table[class="magic"] tr,
table[class="magic"] td {
display: block !important;
width: 100%;
}
/* Y! and Outlook bg image fix */
tr[class=GradeHead] {
width: 100% !important;
height: 198px;
background-image:url('https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/5827ac1b-050b-4752-9f9f-728e05e3170b.png');
background-repeat: no-repeat !important;
background-position: 0px 6px !important;
background-size:cover;
}
tr .g-row{
width: 100% !important;
height: auto;
background-repeat: no-repeat !important;
background-size:cover;
background-position: -2px center !important;
display:table-row;
}
tr .g-row-2{
background-image:url('https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/535bc2e7-194c-4484-b47e-d8ecd81659a1.png');
}
tr .g-row-3{
background-image:url('https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/573b935e-64d4-43d4-b29c-aa3cc0661dbf.png');
}
tr .g-row-4{
background-image:url('https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/535bc2e7-194c-4484-b47e-d8ecd81659a1.png');
}
td[class=option] {
width: 300px !important;
height: auto !important;
display: table-cell;
}
td[class=cover] {
background-repeat: no-repeat !important;
background-position: center !important;
width: 100% !important;
height: auto;
}
td .boys {
background-image: url('img/row-1-bubbles.png') !important;
}
td .ship {
background-image: url('img/row-2-ship.png') !important;
}
td .resort {
background-image: url('img/row-3-resort.png') !important;
}
/* iphone X Media call */
#media only screen
and (device-width : 375px)
and (device-height : 812px)
and (-webkit-device-pixel-ratio : 3)
and (device-pixel-ratio : 3) { }
/* iphone 7,8 Media call */
#media only screen
and (device-width : 375px)
and (device-height : 667px)
and (-webkit-device-pixel-ratio : 2)
and (device-pixel-ratio : 2) { }
/* iphone 6 Plus, 6S Plus, 7 Plus, 8 Plus Media call */
#media only screen
and (device-width : 414px)
and (device-height : 736px)
and (-webkit-device-pixel-ratio : 3)
and (device-pixel-ratio : 3) { }
body{
background-color:#fff;
}
*{
font-family:Futura,Helvetica,Arial,sans-serif;
}
p{
color:#929292;
font-size:18px;
}
.plus{
font-size:2em;
padding:20px 10px;
border-radius:30px;
}
a{
text-decoration:none;
color:inherit;
}
#footer a{
text-decoration:underline;
}
#footer p{
color:#c5b9ac;
font-size:12px;
}
.btn-pink{
color:#fff;
background-color:#fa0375;
display:block;
padding:15px 5px;
border-radius:30px;
font-size:22px;
text-align:center;
}
.btn-white{
color:#fff;
border:2px solid #fff;
font-size:18px;
display:block;
margin:10px 25px;
padding:10px 15px;
text-align:center;
text-transform:uppercase;
border-radius:30px;
}
.btn-purp{
color:#fff;
background-color:#69034c;
display:block;
padding:15px 5px;
border-radius:30px;
font-size:20px;
text-align:center;
margin:25px 70px;
}
h3{
color:#fff;
font-size:21px;
font-weight:normal;
}
table,tr,td{
border:none;
border-collapse:collapse;
padding:0;
border-color:rgba(0,0,0,0);
border-style:none;
overflow:hidden;
}
td h3,td p{
margin:10px;
}
<table style="width:600px;height:1726px;table-layout:fixed;display:block;border:none;clear:both;" class="magic" width="600">
<tr class="GradeHead" style="height:198px;background:url('https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/5827ac1b-050b-4752-9f9f-728e05e3170b.png') no-repeat 0px 6px;">
<td colspan="4" style="height:198px; width:600px;">
<h2 style="display:none;">You're always up to speed</h2>
</td>
</tr>
<tr style="" class="g-row g-row-2">
<td class="option" colspan="2" width="300" style="width:300px;text-align:center;" >
<h3>HEADLINE </h3>
<p>COPY</p>
Explore
</td>
<td colspan="2" class="cover boys" width="300" style="width:300px;height:300px;background:url('https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/8d7b0292-bd08-4b33-87aa-0f56c86b24e3.png') no-repeat;">
</td>
</tr>
<tr style="" class="g-row g-row-3">
<td colspan="2" width="300" class="cover ship" style="width:300px;height:300px;) no-repeat;">
</td>
<td class="option" colspan="2" width="300" style="width:300px;text-align:center;">
<h3>HEADLINE </h3>
<p>COPY</p>
Explore
</td>
</tr>
<tr style="" class="g-row g-row-4">
<td class="option" colspan="2" width="300" style="width:300px;text-align:center;">
<h3>HEADLINE </h3>
<p>COPY</p>
Explore
</td>
<td class="cover resort" colspan="2" width="300" style="width:300px;height:300px;background:url('https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/ecd8b1b9-fed4-42f8-a262-1f769323d7da.png') no-repeat;">
</td>
</tr>
<tr style="height:180px;">
<td colspan="4" style="background:url('https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/d176648a-185c-415d-986e-545b427b1812.png') no-repeat 0px -1px;">
<h2 style="display:none;">Connect with us: #myvacaya</h2>
</td>
</tr>
<tr>
<td>
<img src="https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/43334793-5066-4ead-accb-a1bfcf81e6b1.png" alt="A well dressed man celebrating">
</td> <td>
<img src="https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/eaea60f1-f4ba-44f2-9175-789386790126.png" alt="A group of partygoers in the sun" style="margin-bottom: 24px;">
</td>
<td>
<img src="https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/08329669-dc4e-423d-8769-acb741cf5824.png" alt="A group of mixed race friends at the beach" style="margin-bottom: 24px;">
</td>
<td>
<img src="https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/3dd02748-8597-42df-8bb4-6817f959337c.png" alt="A woman in a sun hat drinking from a straw" style="margin-bottom: 24px;">
</td>
</tr>
<tr>
<td colspan="4">
Qs? WE'VE GOT As
LET'S DO THIS
</td>
</tr>
</table>
The blue table data entry won't reside its width. Is there a new html5 way to be able to achieve this feat? The row should be the same width as the photo above it.
<div class="template" style="text-align:center">
<table width="100%" and height="100%" BORDER=0 CELLSPACING=0 CELLPADDING=0 align="center">
<tr>
<td width='100%' height='100%' bgcolor='#f2f3f4'>
<div style="text-align: center;">
<img src ="https://image.ibb.co/i4ykZk/roverlogo.png" alt="RoverLogo">
</div>
</td>
</tr>
<!-- Background photo -->
<TABLE width="80%" BORDER="0" cellpadding="0" CELLSPACING="0" align="center">
<TR>
<TD WIDTH="997" HEIGHT="326"
background="https://image.ibb.co/dO1HfQ/dog3edit.jpg" style="background-
image:url(https://image.ibb.co/dO1HfQ/dog3edit.jpg); background-repeat:
no-repeat;">
<!-- <b>WELCOME TO ROVER! </b> -->
<FONT class="titletext" color="white" align="center" style="width: 800px;
font-size: 50px;"><b>WELCOME TO ROVER!</b></FONT><br><br>
<FONT class="subtitletext" color="white" align="center" style="width:
100px;
font-size: 30px;">Ready to get started?</FONT><br><br><br>
<a href="#"><img src="https://image.ibb.co/nvbiLQ/button.png"
alt="Button" border="0"></a>
</TD>
</TR>
<tr>
<td width="80%" bgcolor="#blue" style="width:80%">
</td>
</tr>
</TABLE>
</table>
</div>
article {
width: 100%;
}
#banner {
background: url("https://image.ibb.co/dO1HfQ/dog3edit.jpg") no-repeat no-repeat;
padding: 25px 0;
}
h1 {
font-size: 50px;
margin-bottom: 0;
}
h1, p {
color: white;
width: 100%;
text-align: center;
}
p {
font-size: 30px;
}
button {
width: 200px;
background: #00c55c;
border: none;
padding: 12px 24px;
color: white;
font-size: 24px;
border-radius: 6px;
display: block;
margin: 0 auto;
clear: both;
}
#logo {
background: #f2f3f4;
}
#logo img {
display: block;
margin: 0 auto;
clear: both;
}
<article>
<section id="logo">
<img src ="https://image.ibb.co/i4ykZk/roverlogo.png" alt="RoverLogo">
</section>
<section id="banner">
<h1>Welcome to Rover!</h1>
<p>Ready to get started?</p>
<button>Search Sitters</button>
</section>
</article>
I'd do something like this. No table for layout. If it has to be inline, just put a <style></style> tag above the HTML block.
For the background color of the button i used the following website.
https://flatuicolors.com/
I also made everything separated into css and html so you could see. No inline CSS. This is the proper way to use tables, and headers.
Use a <div> tag for the headers as it automatically pushes things to a new line after it. No need for the break tag. The break tag is rarely used in design anymore.
Also i made sure that your separator line is blue.
I believe there are better ways of accomplishing this WITHOUT tables, however you said you needed this in table form, so here ya go!
table {
width: 80%;
border: none;
text-align: center;
margin: 0 auto;
color: white;
}
.background {
background: url('https://image.ibb.co/dO1HfQ/dog3edit.jpg');
}
.titletext {
font-size: 50px;
}
.subtitletext {
font-size: 30px;
}
button {
margin: 10px 0;
width: 50%;
border-radius: 15px;
height: 100px;
background: #27ae60;
border: 1px solid rgba(255,255,255,0.8);
font-size: 20px;
color: white;
}
button:hover {
background-color: #2ecc71;
}
.seperator {
width: 80%;
background: blue;
}
<TABLE>
<TR class="background">
<TD>
<div class="titletext">WELCOME TO ROVER!</div>
<div class="subtitletext">Ready to get started?</div>
<button>Search Sitters</button>
</TD>
</TR>
<tr>
<td class="seperator""></td>
</tr>
</TABLE>
You are using inline css,Try this:
<TABLE style="width="80%" BORDER="0" cellpadding="0" CELLSPACING="0" align="center"";>
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I made a simple email campaign. I tried testing it by sending it to myself. However when I open it in my email it displays as raw html code. How do I email it to myself so that It displays as a campaign and not HTML raw code? I use gmail to send and open it.
Find below my the html code to my email campaign:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=420, target-densitydpi=device-dpi">
<style type="text/css">
/* Mobile-specific Styles */
#media only screen and (max-width: 660px) {
table[class=w0], td[class=w0] { width: 0 !important; }
table[class=w10], td[class=w10], img[class=w10] { width:15px !important; }
table[class=w15], td[class=w15], img[class=w15] { width:15px !important; }
table[class=w30], td[class=w30], img[class=w30] { width:10px !important; }
table[class=w60], td[class=w60], img[class=w60] { width:10px !important; }
table[class=w125], td[class=w125], img[class=w125] { width:80px !important; }
table[class=w130], td[class=w130], img[class=w130] { width:55px !important; }
table[class=w140], td[class=w140], img[class=w140] { width:90px !important; }
table[class=w160], td[class=w160], img[class=w160] { width:170px !important; }
table[class=w170], td[class=w170], img[class=w170] { width:100px !important; }
table[class=w180], td[class=w180], img[class=w180] { width:80px !important; }
table[class=w195], td[class=w195], img[class=w195] { width:80px !important; }
table[class=w220], td[class=w220], img[class=w220] { width:80px !important; }
table[class=w240], td[class=w240], img[class=w240] { width:180px !important; }
table[class=w255], td[class=w255], img[class=w255] { width:185px !important; }
table[class=w275], td[class=w275], img[class=w275] { width:135px !important; }
table[class=w280], td[class=w280], img[class=w280] { width:135px !important; }
table[class=w300], td[class=w300], img[class=w300] { width:198px !important; }
table[class=w325], td[class=w325], img[class=w325] { width:95px !important; }
table[class=w360], td[class=w360], img[class=w360] { width:140px !important; }
table[class=w410], td[class=w410], img[class=w410] { width:180px !important; }
table[class=w470], td[class=w470], img[class=w470] { width:200px !important; }
table[class=w580], td[class=w580], img[class=w580] { width:280px !important; }
table[class=w640], td[class=w640], img[class=w640] { width:400px !important; }
table[class*=hide], td[class*=hide], img[class*=hide], p[class*=hide], span[class*=hide] { display:none !important; }
table[class=h0], td[class=h0] { height: 0 !important; }
p[class=footer-content-left] { text-align: center !important; }
#headline p { font-size: 30px !important; }
.article-content, #left-sidebar{ -webkit-text-size-adjust: 90% !important; -ms-text-size-adjust: 90% !important; }
.header-content, .footer-content-left {-webkit-text-size-adjust: 80% !important; -ms-text-size-adjust: 80% !important;}
img { height: auto; line-height: 100%;}
}
/* Client-specific Styles */
#outlook a { padding: 0; } /* Force Outlook to provide a "view in browser" button. */
body { width: 100% !important; }
.ReadMsgBody { width: 100%; }
.ExternalClass { width: 100%; display:block !important; } /* Force Hotmail to display emails at full width */
/* Reset Styles */
/* Add 100px so mobile switch bar doesn't cover street address. */
body { background-color: #ececec; margin: 0; padding: 0; }
img { outline: none; text-decoration: none; display: block;}
br, strong br, b br, em br, i br { line-height:100%; }
h1, h2, h3, h4, h5, h6 { line-height: 100% !important; -webkit-font-smoothing: antialiased; }
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { color: blue !important; }
h1 a:active, h2 a:active, h3 a:active, h4 a:active, h5 a:active, h6 a:active { color: red !important; }
/* Preferably not the same color as the normal header link color. There is limited support for psuedo classes in email clients, this was added just for good measure. */
h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited { color: purple !important; }
/* Preferably not the same color as the normal header link color. There is limited support for psuedo classes in email clients, this was added just for good measure. */
table td, table tr { border-collapse: collapse; }
.yshortcuts, .yshortcuts a, .yshortcuts a:link,.yshortcuts a:visited, .yshortcuts a:hover, .yshortcuts a span {
color: black; text-decoration: none !important; border-bottom: none !important; background: none !important;
} /* Body text color for the New Yahoo. This example sets the font of Yahoo's Shortcuts to black. */
/* This most probably won't work in all email clients. Don't include code blocks in email. */
code {
white-space: normal;
word-break: break-all;
}
#background-table { background-color: #ececec; }
/* Webkit Elements */
#top-bar { border-radius:6px 6px 0px 0px; -moz-border-radius: 6px 6px 0px 0px; -webkit-border-radius:6px 6px 0px 0px; -webkit-font-smoothing: antialiased; background-color: #043948; color: #e7cba3; }
#top-bar a { font-weight: bold; color: #e7cba3; text-decoration: none;}
#footer { border-radius:0px 0px 6px 6px; -moz-border-radius: 0px 0px 6px 6px; -webkit-border-radius:0px 0px 6px 6px; -webkit-font-smoothing: antialiased; }
/* Fonts and Content */
body, td { font-family: HelveticaNeue, sans-serif; }
.header-content, .footer-content-left, .footer-content-right { -webkit-text-size-adjust: none; -ms-text-size-adjust: none; }
/* Prevent Webkit and Windows Mobile platforms from changing default font sizes on header and footer. */
.header-content { font-size: 12px; color: #e7cba3; }
.header-content a { font-weight: bold; color: #e7cba3; text-decoration: none; }
#headline p { color: #e7cba3; font-family: HelveticaNeue, sans-serif; font-size: 36px; text-align: center; margin-top:0px; margin-bottom:30px; }
#headline p a { color: #e7cba3; text-decoration: none; }
#left-sidebar .toc-item { font-family: HelveticaNeue, sans-serif; font-size: 12px; line-height: 16px; color: #00707b; margin-top: 0px; margin-bottom: 6px; }
#left-sidebar .toc-item a { color: #00707b; text-decoration: none; }
#left-sidebar .toc-heading { font-family: HelveticaNeue, sans-serif; font-size: 11px; line-height: 15px; color:#9a9661; font-weight:bold; }
#left-sidebar .toc-heading a { color: #9a9661; text-decoration: none; }
#left-sidebar .left-column-heading { font-family: HelveticaNeue, sans-serif; font-size: 11px; line-height:15px; color: #9a9661; font-weight:bold; }
#left-sidebar .left-column-heading a { color: #9a9661; text-decoration:none; }
#left-sidebar .left-column-subhead { font-family: HelveticaNeue, sans-serif; font-size: 13px; line-height: 16px; color: #999999; font-weight: bold; margin-top: 0px; margin-bottom: 16px; }
#left-sidebar .left-column-subhead a { color: #999999; text-decoration:none; }
#left-sidebar .left-column-content { font-family: HelveticaNeue, sans-serif; font-size: 12px; line-height: 16px; color: #9a9661; margin-top: 0px; margin-bottom: 16px; }
#left-sidebar .left-column-content a { color: #00707b; text-decoration: none; }
#right-sidebar .toc-item { font-family: HelveticaNeue, sans-serif; font-size: 12px; line-height: 16px; color: #00707b; margin-top: 0px; margin-bottom: 6px; }
#right-sidebar .toc-item a { color: #00707b; text-decoration: none; }
#right-sidebar .toc-heading { font-family: HelveticaNeue, sans-serif; font-size: 11px; line-height: 15px; color:#9a9661; font-weight:bold; }
#right-sidebar .toc-heading a { color: #9a9661; text-decoration: none; }
#right-sidebar .left-column-heading { font-family: HelveticaNeue, sans-serif; font-size: 11px; line-height:15px; color: #9a9661; font-weight:bold; }
#right-sidebar .left-column-heading a { color: #9a9661; text-decoration:none; }
#right-sidebar .left-column-subhead { font-family: HelveticaNeue, sans-serif; font-size: 13px; line-height: 16px; color: #999999; font-weight: bold; margin-top: 0px; margin-bottom: 16px; }
#right-sidebar .left-column-subhead a { color: #999999; text-decoration:none; }
#right-sidebar .left-column-content { font-family: HelveticaNeue, sans-serif; font-size: 12px; line-height: 16px; color: #9a9661; margin-top: 0px; margin-bottom: 16px; }
#right-sidebar .left-column-content a { color: #00707b; text-decoration: none; }
.article-title { font-size: 18px; line-height:24px; color: #9a9661; font-weight:bold; margin-top:0px; margin-bottom:18px; font-family: HelveticaNeue, sans-serif; }
.article-title a { color: #9a9661; text-decoration: none; }
.article-title.with-meta {margin-bottom: 0;}
.article-meta { font-size: 13px; line-height: 20px; color: #ccc; font-weight: bold; margin-top: 0;}
.article-content { font-size: 13px; line-height: 18px; color: #444444; margin-top: 0px; margin-bottom: 18px; font-family: HelveticaNeue, sans-serif; }
.article-content a { color: #00707b; font-weight:bold; text-decoration:none; }
.article-content img { max-width: 100% }
.article-content ol, .article-content ul { margin-top:0px; margin-bottom:18px; margin-left:19px; padding:0; }
.article-content li { font-size: 13px; line-height: 18px; color: #444444; }
.article-content li a { color: #00707b; text-decoration:underline; }
.article-content p {margin-bottom: 15px;}
.footer-content-left { font-size: 12px; line-height: 15px; color: #e2e2e2; margin-top: 0px; margin-bottom: 15px; }
.footer-content-left a { color: #e7cba3; font-weight: bold; text-decoration: none; }
.footer-content-right { font-size: 11px; line-height: 16px; color: #e2e2e2; margin-top: 0px; margin-bottom: 15px; }
.footer-content-right a { color: #e7cba3; font-weight: bold; text-decoration: none; }
#footer { background-color: #043948; color: #e2e2e2; }
#footer a { color: #e7cba3; text-decoration: none; font-weight: bold; }
#permission-reminder { white-space: normal; }
#street-address { color: #e7cba3; white-space: normal; }
</style>
<!--[if gte mso 9]>
<style _tmplitem="50" >
.article-content ol, .article-content ul {
margin: 0 0 0 24px;
padding: 0;
list-style-position: inside;
}
</style>
<![endif]--></head><body><table width="100%" cellpadding="0" cellspacing="0" border="0" id="background-table">
<tbody><tr>
<td align="center" bgcolor="#ececec">
<table class="w640" style="margin:0 10px;" width="640" cellpadding="0" cellspacing="0" border="0">
<tbody><tr><td class="w640" width="640" height="20"></td></tr>
<tr>
<td class="w640" width="640">
<table id="top-bar" class="w640" width="640" cellpadding="0" cellspacing="0" border="0" bgcolor="#00707b">
<tbody><tr>
<td class="w15" width="15"></td>
<td class="w325" width="350" valign="middle" align="left">
<table class="w325" width="350" cellpadding="0" cellspacing="0" border="0">
<tbody><tr><td class="w325" width="350" height="8"></td></tr>
</tbody></table>
<div class="header-content"><webversion>Web Version</webversion><span class="hide"> | <preferences lang="en">Update preferences</preferences> | <unsubscribe>Unsubscribe</unsubscribe></span></div>
<table class="w325" width="350" cellpadding="0" cellspacing="0" border="0">
<tbody><tr><td class="w325" width="350" height="8"></td></tr>
</tbody></table>
</td>
<td class="w30" width="30"></td>
<td class="w255" width="255" valign="middle" align="right">
<table class="w255" width="255" cellpadding="0" cellspacing="0" border="0">
<tbody><tr><td class="w255" width="255" height="8"></td></tr>
</tbody></table>
<table cellpadding="0" cellspacing="0" border="0">
<tbody><tr>
<td valign="middle"><fblike><img src="https://img.createsend1.com/img/templatebuilder/like-glyph.png" border="0" width="8" height="14" alt="Facebook icon"=""></fblike></td>
<td width="3"></td>
<td valign="middle"><div class="header-content"><fblike>Like</fblike></div></td>
<td class="w10" width="10"></td>
<td valign="middle"><tweet><img src="https://img.createsend1.com/img/templatebuilder/tweet-glyph.png" border="0" width="17" height="13" alt="Twitter icon"=""></tweet></td>
<td width="3"></td>
<td valign="middle"><div class="header-content"><tweet>Tweet</tweet></div></td>
<td class="w10" width="10"></td>
<td valign="middle"><forwardtoafriend lang="en"><img src="https://img.createsend1.com/img/templatebuilder/forward-glyph.png" border="0" width="19" height="14" alt="Forward icon"=""></forwardtoafriend></td>
<td width="3"></td>
<td valign="middle"><div class="header-content"><forwardtoafriend lang="en">Forward</forwardtoafriend></div></td>
</tr>
</tbody></table>
<table class="w255" width="255" cellpadding="0" cellspacing="0" border="0">
<tbody><tr><td class="w255" width="255" height="8"></td></tr>
</tbody></table>
</td>
<td class="w15" width="15"></td>
</tr>
</tbody></table>
</td>
</tr>
<tr>
<td id="header" class="w640" width="640" align="center" bgcolor="#00707b">
<table class="w640" width="640" cellpadding="0" cellspacing="0" border="0">
<tbody><tr><td class="w30" width="30"></td><td class="w580" width="580" height="30"></td><td class="w30" width="30"></td></tr>
<tr>
<td class="w30" width="30"></td>
<td class="w580" width="580">
<div align="center" id="headline">
<p>
<strong><singleline label="Title">ABC Widgets</singleline></strong>
</p>
</div>
</td>
<td class="w30" width="30"></td>
</tr>
</tbody></table>
</td>
</tr>
<tr id="complex-content-row"><td class="w640" width="640"><table class="w640" width="640" cellpadding="0" cellspacing="0" border="0">
<tbody><tr>
<td class="w15" width="15" bgcolor="#e2e2e2"></td>
<td id="left-sidebar" class="w140" width="140" bgcolor="#e2e2e2" valign="top" align="left">
<table class="w140" width="140" cellpadding="0" cellspacing="0" border="0">
<tbody><tr><td class="w140" width="140" height="15"></td></tr>
<tr>
<td class="w140" width="140">
<p align="left" class="left-column-heading"><singleline>TABLE OF CONTENTS</singleline></p>
<tableofcontents>
<table cellpadding="0" cellspacing="0" border="0">
<tbody><tr>
<td width="3"></td>
<td valign="top"><p align="left" class="toc-item">•</p></td>
<td width="6"></td>
<td valign="top"><p align="left" class="toc-item"><strong><repeatertitle></strong></p></td>
</tr>
</tbody></table>
</tableofcontents>
</td>
</tr>
<tr><td class="w140" width="140" height="15"></td></tr>
</tbody></table>
<table class="w140" width="140" cellpadding="0" cellspacing="0" border="0">
<tbody><tr><td class="w140" width="140" height="15"></td></tr>
<tr>
<td class="w140" width="140">
<div align="left" class="left-column-heading"><singleline label="Title">IN OTHER NEWS</singleline></div>
</td>
</tr>
</tbody></table>
<repeater>
</repeater>
</td>
<td class="w15" width="15" bgcolor="#e2e2e2"></td>
<td class="w300" width="300" bgcolor="#ffffff" valign="top">
<table class="w300" width="300" cellpadding="0" cellspacing="0" border="0">
<tbody><tr><td class="w300" width="300" height="30"></td></tr>
</tbody></table>
<table class="w300" width="300" cellpadding="0" cellspacing="0" border="0">
<tbody><tr>
<td class="w30" width="30"></td>
<td class="w240" width="240">
<repeater>
</repeater>
</td>
<td class="w30" width="30"></td>
</tr>
</tbody></table>
</td>
<td class="w15" width="15" bgcolor="#e2e2e2"></td>
<td id="right-sidebar" class="w140" width="140" bgcolor="#e2e2e2" valign="top" align="left">
<table class="w140" width="140" cellpadding="0" cellspacing="0" border="0">
<tbody><tr><td class="w140" width="140" height="25"></td></tr>
<tr>
<td class="w140" width="140">
<div align="left" class="left-column-heading"><singleline label="Title">ALSO OF INTEREST</singleline></div>
</td>
</tr>
</tbody></table>
<repeater>
<layout label="Text only">
<table class="w140" width="140" cellpadding="0" cellspacing="0" border="0">
<tbody><tr><td class="w140" width="140" height="15"></td></tr>
<tr>
<td class="w140" width="140">
<p align="left" class="left-column-subhead"><singleline label="Title">Add a title</singleline></p>
<div align="left" class="left-column-content"><multiline label="Description">Enter your description</multiline></div>
</td>
</tr>
</tbody></table>
</layout>
<layout label="Text with image">
<table class="w140" width="140" cellpadding="0" cellspacing="0" border="0">
<tbody><tr><td class="w140" width="140" height="15"></td></tr>
<tr>
<td class="w140" width="140"><p align="left" class="left-column-subhead"><singleline label="Title">Add a title</singleline></p></td>
</tr>
<tr>
<td class="w140" width="140"><img editable="true" label="Image" width="140" class="w140" border="0"></td>
</tr>
<tr><td class="w140" width="140" height="15"></td></tr>
<tr>
<td class="w140" width="140"><div align="left" class="left-column-content"><multiline label="Description">Enter your description</multiline></div></td>
</tr>
</tbody></table>
</layout>
</repeater>
</td>
<td class="w15" width="15" bgcolor="#e2e2e2"></td>
</tr>
</tbody></table>
</td></tr>
<tr>
<td class="w640" width="640"><table class="w640" width="640" cellpadding="0" cellspacing="0" border="0">
<tbody><tr>
<td class="w170" width="170" bgcolor="#e2e2e2" height="15"></td>
<td class="w300" width="300" bgcolor="#ffffff" height="15"></td>
<td class="w170" width="170" bgcolor="#e2e2e2" height="15"></td>
</tr>
</tbody></table></td>
</tr>
<tr>
<td class="w640" width="640">
<table id="footer" class="w640" width="640" cellpadding="0" cellspacing="0" border="0" bgcolor="#043948">
<tbody><tr><td class="w30" width="30"></td><td class="w580 h0" width="360" height="30"></td><td class="w0" width="60"></td><td class="w0" width="160"></td><td class="w30" width="30"></td></tr>
<tr>
<td class="w30" width="30"></td>
<td class="w580" width="360" valign="top">
<span class="hide"><p id="permission-reminder" align="left" class="footer-content-left"></p></span>
<p align="left" class="footer-content-left"><preferences lang="en">Edit your subscription</preferences> | <unsubscribe>Unsubscribe</unsubscribe></p>
</td>
<td class="hide w0" width="60"></td>
<td class="hide w0" width="160" valign="top">
<p id="street-address" align="right" class="footer-content-right"></p>
</td>
<td class="w30" width="30"></td>
</tr>
<tr><td class="w30" width="30"></td><td class="w580 h0" width="360" height="15"></td><td class="w0" width="60"></td><td class="w0" width="160"></td><td class="w30" width="30"></td></tr>
</tbody></table>
</td>
</tr>
<tr><td class="w640" width="640" height="60"></td></tr>
</tbody></table>
</td>
</tr>
</tbody></table></body></html>
Looking forward to your reply.
Add MIME-Version: 1.0 and Content-type: text/html to your mail headers.
A quick hacky way to do it is to create your email html and view it in a browser as a web page. Now ctrl+a select all the rendered html from the page, and paste it into the email you are composing.
This is definitely not the way to go about sending email campaigns, but it will send it as rendered html.
Just note, that your images need to be hosted online, otherwise they will not show up.
That's not how it works. Email clients will escape your html characters, hence you seeing raw html in your inbox, unless you send with the proper MIME headers from a program or Email Service Provider.
For testing webmail clients, I use this google docs spreadsheet which contains a script that uses your gmail account to send html email. I wouldn't use it for mass mailings however because google will probably block your account, but I use it to test send frequently to a few accounts without issue.