<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Luke Marsh</title>
	<atom:link href="http://lukemarsh.co.uk/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://lukemarsh.co.uk</link>
	<description>Freelance Front-end Web Developer, London - HTML5/JS/CSS3</description>
	<lastBuildDate>Wed, 02 May 2012 16:29:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HTML email drop-shadow</title>
		<link>http://lukemarsh.co.uk/index.php/html-email-drop-shadow/</link>
		<comments>http://lukemarsh.co.uk/index.php/html-email-drop-shadow/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 10:50:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://me:81/?p=253</guid>
		<description><![CDATA[Campaign Monitor wrote this article a few years back about nested tables in HTML emails and I thought to myself,&#8230;]]></description>
			<content:encoded><![CDATA[<p>Campaign Monitor wrote <a href="http://www.campaignmonitor.com/blog/post/2644/nested-tables-in-email-how-much-is-too-much/" target="_blank">this article</a> a few years back about nested tables in HTML emails and I thought to myself, wouldn&#8217;t this be useful for creating a drop-shadow effect? There are a couple of other ways to achieve this but I&#8217;ll explain why they aren&#8217;t such a good idea:</p>
<ul>
<li><strong>CSS3</strong> &#8211; Probably the quickest way and the least amount of code, but this won&#8217;t work in all email clients.</li>
<li><strong>images</strong> &#8211; This would look better but the file size would be larger and the images won&#8217;t expand when we add more content.</li>
</ul>
<p><a class="button rounded" href="http://www.lukemarsh.co.uk/drop-shadow.html">Demo</a></p>
<hr class="" />
<p>Below I&#8217;ll explain how to create drop-shadows that look something like this using only nested tables:<br />
<img src="http://www.lukemarsh.co.uk/wp-content/uploads/2012/04/email1.jpg" alt="" width="590" height="213" /></p>
<p>The first thing to think about is how wide you want it. In the example above, I&#8217;ve used a 4 width drop-shadow on each side. This means I&#8217;ll need to nest 4 tables.</p>
<p>When I&#8217;m building HTML emails I like to reset the border, padding and spacing for each table:</p>
<pre>&lt;table cellpadding="0" cellspacing="0" border="0"&gt;</pre>
<p>After that, each nested table will need to be 2 pixels smaller than its parent, aligned to the center and have a slightly darker background colour:</p>
<pre>&lt;table width="608" bgcolor="#f7f7f7"&gt;
    &lt;tr&gt;
        &lt;td width="608"&gt;
            &lt;table width="606" bgcolor="#f0f0f0" align="center"&gt;
                &lt;td width="606"&gt;</pre>
<p>Once this has been repeated a few times you will start to see a gradient appear.</p>
<p>For the top and bottom it&#8217;s probably better to use images if you need it to work in lower versions of Lotus Notes. If not this is how to do it the nested way:</p>
<p>Add another table before the child table but this time add a table cell with a 1 pixel height and the same background colour. Do this for each nested table.</p>
<pre>&lt;table width="608" bgcolor="#f0f0f0" align="center"&gt;
    &lt;tr&gt;
        &lt;td width="608"&gt;
            &lt;table width="606" bgcolor="#e8e8e8" align="center"&gt;
                &lt;tr&gt;
                    &lt;td width="606" height="1"&gt;&lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;
            &lt;table width="606" bgcolor="#e8e8e8" align="center"&gt;</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://lukemarsh.co.uk/index.php/html-email-drop-shadow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

