<?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>Cameron McKay &#187; ie6</title>
	<atom:link href="http://cdmckay.org/blog/tag/ie6/feed/" rel="self" type="application/rss+xml" />
	<link>http://cdmckay.org/blog</link>
	<description>Programming, Politics and Game Design</description>
	<lastBuildDate>Thu, 09 Sep 2010 06:34:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Making tables print pretty in IE, part 2</title>
		<link>http://cdmckay.org/blog/2009/01/29/making-tables-print-pretty-in-ie-part-2/</link>
		<comments>http://cdmckay.org/blog/2009/01/29/making-tables-print-pretty-in-ie-part-2/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 23:00:52 +0000</pubDate>
		<dc:creator>cdmckay</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[ie7]]></category>
		<category><![CDATA[printing]]></category>
		<category><![CDATA[tables]]></category>

		<guid isPermaLink="false">http://couchware.ca/blogs/cam/?p=29</guid>
		<description><![CDATA[In my last post, I mentioned that I had come up with a way to prevent tables in Internet Explorer 6 and 7 from looking like this.  In this post, I&#8217;ll show you how to do it.
(Disclaimer: This method has been found to break if the a cell has a line break in it [...]]]></description>
			<content:encoded><![CDATA[<p>In my last <a href="http://cdmckay.org/blog/2009/01/28/making-tables-print-pretty-in-ie/">post</a>, I mentioned that I had come up with a way to prevent tables in Internet Explorer 6 and 7 from looking like <a href="http://www.xefteri.com/articles/content/26/images/table_footer_issue.gif">this</a>.  In this post, I&#8217;ll show you how to do it.</p>
<p><strong>(Disclaimer: This method has been found to break if the a cell has a line break in it or is wrapped to a second line).</strong></p>
<p><span id="more-29"></span></p>
<p>First, let&#8217;s start with an example table:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:Consolas, monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">table</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;example-table&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">thead</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">th</span>&gt;</span>First Name<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">th</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">th</span>&gt;</span>Last Name<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">th</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">th</span>&gt;</span>Client #<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">th</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">thead</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tbody</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Joe<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Shmoe<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>123451<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Joe<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Shmoe<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>123451<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Joe<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Shmoe<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>123451<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Joe<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Shmoe<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>123451<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
    <span style="color: #808080; font-style: italic;">&lt;!-- Repeat these many times to make it go to a second page. --&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tbody</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">table</span>&gt;</span></pre></div></div>

<p>Add a stylesheet like this:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:Consolas, monospace;"><span style="color: #cc00cc;">#example-table</span>
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border-collapse</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">collapse</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#example-table</span> th<span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#example-table</span> td
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>If you repeat those rows enough times you can get the graphical glitch mentioned above.  Now, to fix it, what we&#8217;ll do is add a <code>&lt;div&gt;</code> tag to every cell and then make it provide the side borders.</p>
<p>So first, we&#8217;ll modify the table as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:Consolas, monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">table</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;example-table&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">thead</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">th</span>&gt;</span>First Name<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">th</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">th</span>&gt;</span>Last Name<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">th</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">th</span>&gt;</span>Client #<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">th</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">thead</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tbody</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;cell&quot;</span>&gt;</span>Joe<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;cell&quot;</span>&gt;</span>Shmoe<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;last-col&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;cell&quot;</span>&gt;</span>123451<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>    
    <span style="color: #808080; font-style: italic;">&lt;!-- Repeat this many times to make it go to a second page. --&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tbody</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">table</span>&gt;</span></pre></div></div>

<p>What we&#8217;ve done here is added a <code>&lt;div&gt;</code> to each cell and given these <code>&lt;div&gt;</code>&#8217;s a class called <code>cell</code>.  This is so we can do stuff to them in our CSS stylesheet.  We&#8217;ve also given the last cell in each row the class <code>last-col</code>.  This is so we can identify the last column of each row.  The reasoning for this will be explained shortly.</p>
<p>Now, as I&#8217;ve said, our goal here is to replace the <code>table</code>-provided vertical borders (the | ones) with the <code>div</code>-provided ones.  So we need to modify the stylesheet to reflect that:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:Consolas, monospace;"><span style="color: #cc00cc;">#example-table</span>
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border-collapse</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">collapse</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#example-table</span> th<span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#example-table</span> td
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>There&#8217;s also an issue of padding.  By default, tables are slightly padded, which is fine for most circumstances.  However, in this case, padding would be counterproductive, it would prevent the <code>div</code>&#8217;s border from matching up with the <code>table</code>&#8217;s border.  So that&#8217;ll have to be changed:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:Consolas, monospace;"><span style="color: #cc00cc;">#example-table</span>
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border-collapse</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">collapse</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#example-table</span> th<span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#example-table</span> td
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Time for some <code>div</code> styling.  Since the <code>div</code> is our new cell, we need to style it as such.  First thing, let&#8217;s make the <code>div</code> provide us with sides.  Now, we could do something like <code>border-left: 1px black solid; border-right: 1px black solid;</code>.  This would look fine, except that all the vertical borders in the middle of the table would 2 pixels wide (think about it).  So, instead, we&#8217;ll make all the <code>div</code> cells provide borders on the left side, except for the last column, which&#8217;ll provide borders on both sides (hence the purpose of the <code>last-col</code> class).</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:Consolas, monospace;">div<span style="color: #6666ff;">.cell</span>
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#example-table</span> <span style="color: #6666ff;">.last-col</span> div<span style="color: #6666ff;">.cell</span>
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>We also need to add back the padding we stripped out from the table <code>td</code> tags:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:Consolas, monospace;">div<span style="color: #6666ff;">.cell</span>
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">4px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#example-table</span> <span style="color: #6666ff;">.last-col</span> div<span style="color: #6666ff;">.cell</span>
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>And there you have it.  Now when you load up print preview, your tables should look pretty.  Here&#8217;s the final stylesheet in case you got lost:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:Consolas, monospace;"><span style="color: #808080; font-style: italic;">/* So the headers will display on every page. */</span>
thead <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">table-header-group</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Make table only provides vertical border. */</span>
<span style="color: #cc00cc;">#example-table</span>
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border-collapse</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">collapse</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* 
 * Make header and normal cells only show top and bottom border,
 * and remove all padding so the div lines will match up with the table.
 */</span>
<span style="color: #cc00cc;">#example-table</span> th<span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#example-table</span> td
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Make the div cell only provide the left border, and simulate table padding. */</span>
div<span style="color: #6666ff;">.cell</span>
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">4px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Provide the right border in the last column. */</span>
<span style="color: #cc00cc;">#example-table</span> <span style="color: #6666ff;">.last-col</span> div<span style="color: #6666ff;">.cell</span>
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://cdmckay.org/blog/2009/01/29/making-tables-print-pretty-in-ie-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
