<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Tabular Weirdness</title>
	<atom:link href="http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/feed/" rel="self" type="application/rss+xml" />
	<link>http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/</link>
	<description>Things that Eric A. Meyer, CSS expert, writes about on his personal Web site; it&#039;s largely Web standards and Web technology, but also various bits of culture, politics, personal observations, and other miscellaneous stuff</description>
	<lastBuildDate>Wed, 17 Mar 2010 18:47:03 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ken</title>
		<link>http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-185624</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Sun, 24 Jun 2007 14:47:28 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-185624</guid>
		<description>I have been working to resolve three different table rendering issues with Opera (see &lt;a href=&quot;http://my.opera.com/community/forums/topic.dml?id=152860&quot; rel=&quot;nofollow&quot;&gt;this forum thread&lt;/a&gt;). These issues include the CAPTION madness described above (my name links to the page containing the table causing the problem).

I would like to add an update to the post above in regards to whether the CAPTION is supposed to be subservient the TABLE box or outside the table box. &lt;a href=&quot;http://www.w3.org/TR/CSS21/tables.html#q5&quot; rel=&quot;nofollow&quot;&gt;Section 17.4 of CSS 2.1&lt;/a&gt; has been apparently changed and now makes the CAPTION box subservient to the TABLE box. This means that some time between when the post above was written in Jan. 2005 and my finding this post in June 2007 somebody reversed the rules of how the CAPTION box is supposed to behave.  Nothing like throwing fuel on the confusion.

Personally, I think the original behavior makes more sense given the explanation above.  However, I just wish that whatever the correct behavior is that all browsers would handle this in the same way.</description>
		<content:encoded><![CDATA[<p>I have been working to resolve three different table rendering issues with Opera (see <a href="http://my.opera.com/community/forums/topic.dml?id=152860" rel="nofollow">this forum thread</a>). These issues include the CAPTION madness described above (my name links to the page containing the table causing the problem).</p>
<p>I would like to add an update to the post above in regards to whether the CAPTION is supposed to be subservient the TABLE box or outside the table box. <a href="http://www.w3.org/TR/CSS21/tables.html#q5" rel="nofollow">Section 17.4 of CSS 2.1</a> has been apparently changed and now makes the CAPTION box subservient to the TABLE box. This means that some time between when the post above was written in Jan. 2005 and my finding this post in June 2007 somebody reversed the rules of how the CAPTION box is supposed to behave.  Nothing like throwing fuel on the confusion.</p>
<p>Personally, I think the original behavior makes more sense given the explanation above.  However, I just wish that whatever the correct behavior is that all browsers would handle this in the same way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Top 15 CSS Tables Data : Ultimate Web Developer Lists : eConsultant</title>
		<link>http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-38668</link>
		<dc:creator>Top 15 CSS Tables Data : Ultimate Web Developer Lists : eConsultant</dc:creator>
		<pubDate>Wed, 05 Jul 2006 19:30:13 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-38668</guid>
		<description>[...] Tabular Weirdness : by Eric Meyer [...]</description>
		<content:encoded><![CDATA[<p>[...] Tabular Weirdness : by Eric Meyer [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stuart</title>
		<link>http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-7526</link>
		<dc:creator>stuart</dc:creator>
		<pubDate>Tue, 25 Oct 2005 08:10:15 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-7526</guid>
		<description>the only way i have been able to solve the problem is to remove the margins on the table and play around with the positioning of the table on the page.  This fix keeps ie happy and will work in firefox.</description>
		<content:encoded><![CDATA[<p>the only way i have been able to solve the problem is to remove the margins on the table and play around with the positioning of the table on the page.  This fix keeps ie happy and will work in firefox.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ron Pringle</title>
		<link>http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4832</link>
		<dc:creator>Ron Pringle</dc:creator>
		<pubDate>Thu, 27 Jan 2005 22:08:59 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4832</guid>
		<description>Interesting to come across this as I&#039;ve been working out problems in my own data tables and decided to document how the captions are treated by various browsers. I have a &lt;a href=&quot;http://www.aurora-il.org/testsite/table_test.htm&quot;&gt;test case&lt;/a&gt; page up and would appreciate contributions by others.</description>
		<content:encoded><![CDATA[<p>Interesting to come across this as I&#8217;ve been working out problems in my own data tables and decided to document how the captions are treated by various browsers. I have a <a href="http://www.aurora-il.org/testsite/table_test.htm">test case</a> page up and would appreciate contributions by others.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer Grucza</title>
		<link>http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4717</link>
		<dc:creator>Jennifer Grucza</dc:creator>
		<pubDate>Thu, 20 Jan 2005 19:45:47 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4717</guid>
		<description>I &lt;a href=&quot;http://jennifergrucza.com/blog/archives/2004/12/06/ie-ignores-margin-on-table-captions&quot;&gt;ran into this caption problem&lt;/a&gt; as well.  I think I got around it by not using a margin on the table after all, putting it on the element before the table, instead.

Another thing was that I was able to set the width of the caption to smaller than the table in Firefox (to make the caption look kind of like a tab that only goes partway across), but IE ignores it and makes it full-width.  I figured it didn&#039;t look bad enough to try to find a fix.</description>
		<content:encoded><![CDATA[<p>I <a href="http://jennifergrucza.com/blog/archives/2004/12/06/ie-ignores-margin-on-table-captions">ran into this caption problem</a> as well.  I think I got around it by not using a margin on the table after all, putting it on the element before the table, instead.</p>
<p>Another thing was that I was able to set the width of the caption to smaller than the table in Firefox (to make the caption look kind of like a tab that only goes partway across), but IE ignores it and makes it full-width.  I figured it didn&#8217;t look bad enough to try to find a fix.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jules</title>
		<link>http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4525</link>
		<dc:creator>Jules</dc:creator>
		<pubDate>Thu, 13 Jan 2005 02:00:33 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4525</guid>
		<description>The specifications allow captions to be wider than tables which does seem strange when there is a width specified for the table and the caption tag is nested within the table tags &#0151; you would think that the caption would be restricted by the width of the table. However, the caption alignment (using either HTML or CSS methods) &lt;strong&gt;should&lt;/strong&gt; place the caption to the left or right of the table (kinda like floating to the left or right). Given this, then caption is not bound by the width of the table.

Currently, if I remember correctly, these caption alignments are not properly rendered by any current browser.</description>
		<content:encoded><![CDATA[<p>The specifications allow captions to be wider than tables which does seem strange when there is a width specified for the table and the caption tag is nested within the table tags &#0151; you would think that the caption would be restricted by the width of the table. However, the caption alignment (using either HTML or CSS methods) <strong>should</strong> place the caption to the left or right of the table (kinda like floating to the left or right). Given this, then caption is not bound by the width of the table.</p>
<p>Currently, if I remember correctly, these caption alignments are not properly rendered by any current browser.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4514</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Wed, 12 Jan 2005 22:49:40 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4514</guid>
		<description>Ran into the same problem designing tables to return tabular data in PHP. Got so frustrated with the unintuitive nature of the tag (aligning it LEFT or RIGHT of the table???) that we scrapped it in place of a heading-level tag, h3 I believe.</description>
		<content:encoded><![CDATA[<p>Ran into the same problem designing tables to return tabular data in PHP. Got so frustrated with the unintuitive nature of the tag (aligning it LEFT or RIGHT of the table???) that we scrapped it in place of a heading-level tag, h3 I believe.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Ametjan</title>
		<link>http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4512</link>
		<dc:creator>Steve Ametjan</dc:creator>
		<pubDate>Wed, 12 Jan 2005 21:29:01 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4512</guid>
		<description>I was recently working on a design for the company I work for, and ran into the same problem with the data tables I was using in IE. I think the reason that IE renders the borders as a light gray is because that&#039;s the default color for a table border... or at least for the light-shadow side of the border, and because you&#039;re limiting the border down to just 1px, it can only display the light-shadow side. Just a theory though...</description>
		<content:encoded><![CDATA[<p>I was recently working on a design for the company I work for, and ran into the same problem with the data tables I was using in IE. I think the reason that IE renders the borders as a light gray is because that&#8217;s the default color for a table border&#8230; or at least for the light-shadow side of the border, and because you&#8217;re limiting the border down to just 1px, it can only display the light-shadow side. Just a theory though&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Rice</title>
		<link>http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4485</link>
		<dc:creator>Adam Rice</dc:creator>
		<pubDate>Wed, 12 Jan 2005 14:43:52 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4485</guid>
		<description>I can see how, from a markup-centric view of documents, this would seem strange and annoying. However, if you look at the way table captions (and image captions) are used in the hoary old world of print, you&#039;ll see this is just enshrining existing usage.

If you look at an article from a technical jounal (and I have one on my desk right now that illustrates this), you&#039;ll see that tables are no wider than necessary for their tabular contents, but captions are up to the width of the column. And, dare I say, it would look odd to force a lengthy caption to wrap at the width of a narrow table</description>
		<content:encoded><![CDATA[<p>I can see how, from a markup-centric view of documents, this would seem strange and annoying. However, if you look at the way table captions (and image captions) are used in the hoary old world of print, you&#8217;ll see this is just enshrining existing usage.</p>
<p>If you look at an article from a technical jounal (and I have one on my desk right now that illustrates this), you&#8217;ll see that tables are no wider than necessary for their tabular contents, but captions are up to the width of the column. And, dare I say, it would look odd to force a lengthy caption to wrap at the width of a narrow table</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Snook</title>
		<link>http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4484</link>
		<dc:creator>Jonathan Snook</dc:creator>
		<pubDate>Wed, 12 Jan 2005 14:26:37 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4484</guid>
		<description>For the grey table border, I suspect IE does it that way because that&#039;s the way it&#039;s always done it. It&#039;s not according to the HTML4 spec, mind you, but it is consistent. I&#039;ve never noticed it because I&#039;ve always specified a color when specifying borders. Probably for that reason.</description>
		<content:encoded><![CDATA[<p>For the grey table border, I suspect IE does it that way because that&#8217;s the way it&#8217;s always done it. It&#8217;s not according to the HTML4 spec, mind you, but it is consistent. I&#8217;ve never noticed it because I&#8217;ve always specified a color when specifying borders. Probably for that reason.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Hester</title>
		<link>http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4483</link>
		<dc:creator>Chris Hester</dc:creator>
		<pubDate>Wed, 12 Jan 2005 13:33:03 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4483</guid>
		<description>What I find slightly annoying is that if the caption contains text that is wider than the table, the text spills out. The table does not get widened to match. Worse, nor does any border on the caption, leaving a mess. (At least in Opera 7.54u1 - I haven&#039;t checked other browsers.)

You can see the effect on this page I made to test IE6 and the Zoom filter (open it in Opera):

&lt;a href=&quot;http://www.designdetector.com/tips/zoomtest.html&quot;&gt;Zoom Test&lt;/a&gt;

Perhaps this is normal behaviour, but doesn&#039;t make captions very useful. I&#039;d have to put breaks in the text to make it match the table width!</description>
		<content:encoded><![CDATA[<p>What I find slightly annoying is that if the caption contains text that is wider than the table, the text spills out. The table does not get widened to match. Worse, nor does any border on the caption, leaving a mess. (At least in Opera 7.54u1 &#8211; I haven&#8217;t checked other browsers.)</p>
<p>You can see the effect on this page I made to test IE6 and the Zoom filter (open it in Opera):</p>
<p><a href="http://www.designdetector.com/tips/zoomtest.html">Zoom Test</a></p>
<p>Perhaps this is normal behaviour, but doesn&#8217;t make captions very useful. I&#8217;d have to put breaks in the text to make it match the table width!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anne</title>
		<link>http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4482</link>
		<dc:creator>Anne</dc:creator>
		<pubDate>Wed, 12 Jan 2005 13:26:12 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4482</guid>
		<description>The last sentence should have &#039;either&#039; in the end. Basically the whole CSS table specification is based on backwards compatibility. CSS 2.1 could not solve that problem I believe and I doubt if CSS 3 can.</description>
		<content:encoded><![CDATA[<p>The last sentence should have &#8216;either&#8217; in the end. Basically the whole CSS table specification is based on backwards compatibility. CSS 2.1 could not solve that problem I believe and I doubt if CSS 3 can.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anne</title>
		<link>http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4481</link>
		<dc:creator>Anne</dc:creator>
		<pubDate>Wed, 12 Jan 2005 08:56:59 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4481</guid>
		<description>I have the feeling this was done for compatibility reasons. If you look at how the &lt;a href=&quot;http://www.w3.org/TR/html401/struct/tables.html#h-11.2.2&quot;&gt;CAPTION&lt;/a&gt; element is defined in HTML 4.01 you can see that the ALIGN attribute allows you to place the CAPTION element top, right, bottom and left of the TABLE element. In such cases, it is probably easier if it is placed outside of the TABLE box.

It is not a really nice solution, obviously. But I do not like the fact that &#039;height&#039; is not really &#039;height&#039; (and &#039;width&#039; is not really &#039;width&#039;) when applied to TABLE elements or elements that are styled as a table.</description>
		<content:encoded><![CDATA[<p>I have the feeling this was done for compatibility reasons. If you look at how the <a href="http://www.w3.org/TR/html401/struct/tables.html#h-11.2.2">CAPTION</a> element is defined in HTML 4.01 you can see that the ALIGN attribute allows you to place the CAPTION element top, right, bottom and left of the TABLE element. In such cases, it is probably easier if it is placed outside of the TABLE box.</p>
<p>It is not a really nice solution, obviously. But I do not like the fact that &#8216;height&#8217; is not really &#8216;height&#8217; (and &#8216;width&#8217; is not really &#8216;width&#8217;) when applied to TABLE elements or elements that are styled as a table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tommy Olsson</title>
		<link>http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4480</link>
		<dc:creator>Tommy Olsson</dc:creator>
		<pubDate>Wed, 12 Jan 2005 06:38:11 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4480</guid>
		<description>I&#039;ve encountered this caption problem before, and it is annoying. I don&#039;t usually blame the standards, because the people behind them have normally thought about issues that I haven&#039;t, but table captions seem less than intuitive.

Since the &lt;code&gt;CAPTION&lt;/code&gt; element is structurally subordinate to the &lt;code&gt;TABLE&lt;/code&gt; element, I find it natural that it &quot;lives&quot; within the table&#039;s box. Trying to have a left-justified caption in a centred table, however, clearly indicates that this is not the case in Gecko browsers. And since weird behaviour in Gecko browsers usually indicate weirdness in the CSS specification, who am I to grumble? :)

Re: border colour in &lt;abbr&gt;IE&lt;/abbr&gt;, I think I&#039;ve come across a similar bug that wasn&#039;t related to tables. It seems as if the foreground colour isn&#039;t properly inherited as border colour in &lt;abbr&gt;IE&lt;/abbr&gt;, and that you often need to set it explicitly.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve encountered this caption problem before, and it is annoying. I don&#8217;t usually blame the standards, because the people behind them have normally thought about issues that I haven&#8217;t, but table captions seem less than intuitive.</p>
<p>Since the <code>CAPTION</code> element is structurally subordinate to the <code>TABLE</code> element, I find it natural that it &#8220;lives&#8221; within the table&#8217;s box. Trying to have a left-justified caption in a centred table, however, clearly indicates that this is not the case in Gecko browsers. And since weird behaviour in Gecko browsers usually indicate weirdness in the CSS specification, who am I to grumble? :)</p>
<p>Re: border colour in <abbr>IE</abbr>, I think I&#8217;ve come across a similar bug that wasn&#8217;t related to tables. It seems as if the foreground colour isn&#8217;t properly inherited as border colour in <abbr>IE</abbr>, and that you often need to set it explicitly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Grevers</title>
		<link>http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4478</link>
		<dc:creator>Richard Grevers</dc:creator>
		<pubDate>Wed, 12 Jan 2005 04:55:11 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comment-4478</guid>
		<description>Opera, FYI, behaves as exactly as Safarai does (5px margin between the caption box and table top border, and 16px above the caption box). I see that IE puts no gap between caption box and table top.</description>
		<content:encoded><![CDATA[<p>Opera, FYI, behaves as exactly as Safarai does (5px margin between the caption box and table top border, and 16px above the caption box). I see that IE puts no gap between caption box and table top.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head profile="http://gmpg.org/xfn/1">
<title>meyerweb.com</title>
<link rel="openid.server" href="http://www.myopenid.com/server">
<link rel="openid.delegate" href="http://emeyer.myopenid.com/">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link rel="shortcut icon" href="/favicon.ico"><link rel="home" href="http://meyerweb.com/" title="Home" ><link rel="stylesheet" href="http://meyerweb.com/ui/meyerweb.css" type="text/css" media="screen, projection"><link rel="stylesheet" href="http://meyerweb.com/ui/theme.css" type="text/css" media="screen, projection" id="themeLink"><link rel="stylesheet" href="http://meyerweb.com/ui/print.css" type="text/css" media="print"><script src="http://meyerweb.com/ui/addresses.js" type="text/javascript"></script><link rel="stylesheet" href="/ui/wordpress.css" type="text/css" media="screen">
<link rel="stylesheet" href="/ui/tfe.css" type="text/css" media="screen">
<link rel="stylesheet" href="/ui/home.css" type="text/css" media="screen">
<link rel="alternate" type="application/rss+xml" title="Thoughts From Eric" href="/eric/thoughts/rss2/full" />
<link rel="alternate" type="application/rss+xml" title="Thoughts From Eric (only technical posts)" href="/eric/thoughts/category/tech/rss2/full" />
<link rel="alternate" type="application/rss+xml" title="Thoughts From Eric (only personal posts)" href="/eric/thoughts/category/personal/rss2/full" />
<link rel="alternate" type="application/rss+xml" title="Distractions" href="/eric/thoughts/recent-links/rss2" />
<link rel="alternate" type="application/rss+xml" title="Excuse of the Day" href="/feeds/excuse/rss20.xml" />
</head>
<body id="www-meyerweb-com" class="hpg">

<div id="sitemast"><h1><a href="/"><span>meyerweb</span>.com</a></h1></div><div id="search"><h4>Exploration</h4><!-- SiteSearch Google --><form method="get" action="http://www.google.com/custom" target="_top"><div><input type="hidden" name="domains" value="meyerweb.com"></input><label for="sbb" style="display: none">Submit search form</label><input type="submit" name="sa" value="Google Search" id="sbb"></input><label for="sbi" style="display: none">Enter your search terms</label><input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input><p><input type="radio" name="sitesearch" value="meyerweb.com" checked id="ss1"></input><label for="ss1" title="Search meyerweb.com">meyerweb.com</label><input type="radio" name="sitesearch" value="" id="ss0"></input><label for="ss0" title="Search the Web">Web</label></p><input type="hidden" name="client" value="pub-3772084027748653"></input><input type="hidden" name="forid" value="1"></input><input type="hidden" name="ie" value="ISO-8859-1"></input><input type="hidden" name="oe" value="ISO-8859-1"></input><input type="hidden" name="safe" value="active"></input><input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input><input type="hidden" name="hl" value="en"></input></div></form><!-- SiteSearch Google --><!-- <form method="get" action="http://www.google.com/custom"><div><input type="submit" name="sa" value="Search"><input type="text" name="q" size="20" maxlength="255" value=""><input type="hidden" name="sitesearch" value="meyerweb.com"></div></form><small><a href="http://www.google.com/search">Powered by Google</a></small> --></div><div id="main"><div class="skipper">Skip to: <a href="#extra">site navigation/presentation</a></div><div class="skipper">Skip to: <a href="#thoughts">Thoughts From Eric</a></div>
<div id="thoughts">


<div class="entry">
<h3><a href="http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/" rel="bookmark" title="Permanent Link: Tabular Weirdness">Tabular Weirdness</a></h3>
<ul class="meta">
<li class="date">Tue 11 Jan 2005</li>
<li class="time">2319</li>
<li class="cat"><a href="http://meyerweb.com/eric/thoughts/category/tech/browsers/" title="View all posts in Browsers" rel="category tag">Browsers</a><br> <a href="http://meyerweb.com/eric/thoughts/category/tech/css/" title="View all posts in CSS" rel="category tag">CSS</a></li>
<li class="cmt"><a href="http://meyerweb.com/eric/thoughts/2005/01/11/tabular-weirdness/#comments">15 responses</a></li>
<li></li><li></li></ul>

<div class="text">
<p>
Recently I was doing some table styling for a client and ran into what I can only call tabular weirdness.  There were two different things that I stumbled across, and interestingly, they were the kinds of problems you wouldn&#8217;t be likely to encounter in layout tables.  These would come up much more often in data tables.
</p>
<p>
In the first case, the general idea was to put some space between the tables and the surrounding material, but as these were data tables, they came with captions.  So I of course put the caption text in <code>caption</code> elements.  That&#8217;s when things started to get inconsistent.
</p>
<p>
To be more precise, the problems began after I left Safari to check the page in other browsers.
<img src="/pix/2005/captiontest-s124.png" alt="" title="Test case in Safari 1.2.4" class="pic border">
In Safari, you see, the caption&#8217;s element box is basically made a part of the table box.  It sits, effectively, between the top table border and the top margin.  That allows the caption&#8217;s width to inherently match the width of the table itself, and causes any top margin given to the table to sit above the caption.  Makes sense, right?  It certainly did to me.
</p>
<p>
However, according to <a href="http://w3.org/TR/CSS21/tables.html#q5" title="17.4 Tables in the visual formatting model">section 17.4 of CSS2.1</a> and the figure that accompanies it, the caption sits entirely outside the table&#8217;s box, and that <strong>includes</strong> the table&#8217;s margin.  The two are still tied together by the generation of an anonymous box, but the upshot is that if you give the table left and right margins, then the caption does <em>not</em> follow suit.  If you give the table a top margin, it pushes the caption away from the table.
<img src="/pix/2005/captiontest-ff10.png" alt="" title="Test case in Firefox 1.0" class="pic border">
This is the behavior evinced by Firefox 1.0, and as unintuitive as it might be, it&#8217;s what the specification demands.
</p>
<p>
The third piece of strangeness was found in IE/Win.  What I&#8217;d done was simply said that some cell borders should be solid&mdash;nothing more complicated than <code>border-bottom: 1px solid</code>.  The idea was that it would, as borders do, pick up the foreground color of the cell, but IE/Win had other ideas.  As best I could tell, the borders were a light gray.  You can see it happen in <a href="/eric/css/tests/captiontest.html">the testcase</a> I constructed to create the images in this entry.  Explicitly specifying a border color fixes the problem, of course, but it was a bit of weirdness I thought I&#8217;d pass along in case anyone runs into the same thing.
</p></div>

</div>

</div>
<p style="font-size: 90%; text-align: right; margin-top: 0.5em; padding-top: 0;">(If you care, there's even an <a href="/eric/thoughts/page/2/">archive of previous thoughts</a>...)</p>

</div><div id="extra"><div class="panel" id="archipelago"><h4>Identity Archipelago</h4><ul><li><a href="http://flickr.com/photos/meyerweb/" rel="me">Flickr</a></li><li><a href="http://twitter.com/meyerweb/" rel="me">Twitter</a></li><li><a href="http://dopplr.com/traveller/meyerweb">Dopplr</a></li><li><a href="http://www.linkedin.com/in/meyerweb" rel="me">LinkedIn</a></li><li><a href="http://technorati.com/profile/emeyer" rel="me">Technorati</a></li></ul></div><div class="panel" id="pointers"><h4>Projects Elsewhere</h4><ul><li><a href="http://aneventapart.com/">An Event Apart</a></li><li><a href="http://complexspiral.com/">Complex Spiral Consulting</a></li><li><a href="http://www.webassist.com/go/css/emeyer/">CSS Sculptor</a></li><li><a href="http://css-discuss.org/">css-discuss</a></li><li><a href="http://microformats.org/">Microformats</a></li><li><a href="http://s5project.org/">S5</a></li></ul></div><div class="panel" id="tour"><ul><li><a href="http://fray.com/issue3/"><img src="http://fray.com/images/i3c.gif" alt="Fray Contributor (Issue 3: Sex &amp; Death)" /></a></li><!-- <li><a href="http://www.webassist.com/go/css/emeyer/"><img src="/pix/CS_ad_180x109.jpg" alt="CSS Sculptor for Dreamweaver" style="max-width: 100%;" /></a></li> --></ul></div><div class="panel">
<h4>Recently Tweeted</h4>
<p class="more"><a href="http://twitter.com/meyerweb">see more</a></p>
<p>About once a year, I de-clutter my office.  I usually do it in the spring because the snow shovel is no longer needed elsewhere. <small>&#8211;tweeted 4 hours, 33 minutes ago</small></p>
</div><div id="sideblog" class="panel">
<h4>Distractions</h4>
<p class="more">
<a href="/eric/thoughts/recent-links/">archive</a>
</p>
<ul>
<li><a href="http://8bitnyc.com/" title="March 17 | All of a sudden I want to establish a mission in Central Park and negotiate with the natives for gold and food.">8-Bit NYC</a></li>
<li><a href="http://www.youtube.com/watch?v=nFicqklGuB0&amp;feature=player_embedded" title="March 12 | Wry comment expressing my appreciation of the creative derivativeness of this video and its uncanny accuracy in mocking common tropes.">Academy Award Winning Movie Trailer</a></li>
<li><a href="http://www.youtube.com/watch?v=414TmP12WAU" title="March 9 | &#8220;Apple juice&#8230; for half price!&#8221;  More like twice PRICELESS.  (Note: If you&#8217;re at work, don your headphones.)">Happy in Paraguay</a> <small>[via <a href="http://unstoppablerobotninja.com/">Ethan</a>]</small></li>
<li><a href="http://www.youtube.com/watch?v=9V5ubAOeOBk&amp;feature=player_embedded" title="February 10 | This is approximately the best thing ever.">U900 -Walk Don&#8217;t Run (Isogabamaware)</a></li>
<li><a href="http://www.456bereastreet.com/archive/201002/sifr_default_css_hides_content_from_at_least_one_screen_reader/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A 456bereastreet %28456 Berea Street%29" title="February 8 | -9999px comes through again, but I really wish we were beyond that kind of thing.">sIFR default CSS hides content from at least one screen reader</a></li>
<li><a href="http://www.macosxhints.com/article.php?story=20100117064356428" title="February 8 | Storing this for future use.">Take a picture with the iSight camera when a folder is opened</a></li>
<li><a href="http://mingle2.com/blog/view/web-developer-mind" title="February 4 | Mostly valid.  (SEE WHAT I DID THERE?)">The Mind of a Web Developer: An Illustrated Diagram</a></li>
<li><a href="http://www.theonion.com/content/news/science_channel_refuses_to_dumb" title="January 28 | &#8220;Punkin Chunkin, for Christ&#8217;s sake&#8230; What more do you people want?&#8221;">Science Channel Refuses To Dumb Down Science Any Further</a></li>
<li><a href="http://www.mailchimp.com/blog/project-omnivore-declassified/" title="January 27 | Sounds like quite a feat.  But I wonder how we&#8217;d feel if Microsoft or Google announced the same kind of thing on their e-mail services.">MailChimp&#8217;s Project Omnivore: Declassified</a></li>
<li><a href="http://www.politifact.com/truth-o-meter/statements/2010/jan/25/carolyn-maloney/congresswoman-says-democratic-presidents-create-mo/" title="January 26 | &#8220;Obviously, luck matters a lot, but when there is a consistent pattern over more than 60 years, it starts to look like more than just luck.&#8221;">Congresswoman says Democratic presidents create more private-sector jobs</a></li>
<li><a href="http://www.ted.com/talks/taylor_mali_what_teachers_make.html" title="January 25 | Truth.">Taylor Mali: What teachers make</a></li>
<li><a href="http://notebook.johnmartz.com/how-websites-work?c=1" title="January 22 | At last, the truth is out and I can stop pretending:  beatific monkeys are what makes it all go.">How websites work</a></li>
<li><a href="http://morsecode.scphillips.com/jtranslator.html" title="January 22 | &#8211; &#8230;. .. &#8230; / .. &#8230; / .- .&#8211; . &#8230; &#8212; &#8212; . / -. &#8212; / &#8230; . .-. .. &#8212; ..- &#8230; .-.. -.&#8211;">Morse Code Translator</a></li>
</ul>
</div>
<div class="panel" id="advisory">
<div class="guarded">
<a href="http://blogadvisorysystem.com/"><img src="/pix/bas/guarded.png" alt="Blog Advisory System Alert Level: Guarded"></a>
</div>
</div>

<div class="panel" id="excuse">
<h4>The <a href="/feeds/excuse/">excuse of the day</a> is</h4>
<p>failure of the AE-35 unit</p>
</div>

<div class="panel" id="extras">
<h4>Extras</h4>
<ul>
<li><a href="/feeds/">Feeds</a> &#8226;</li>
<li><a href="/eric/faq.html">FAQ</a> &#8226;</li>
<li><a href="/family.html">Family</a></li>
</ul>
</div>

</div>

<div id="navigate">
<h4>Navigation</h4>
<ul id="navlinks">
<li id="archLink"><a href="/eric/thoughts/">Archives</a></li>
<li id="cssLink"><a href="/eric/css/">CSS</a></li>
<li id="toolsLink"><a href="/eric/tools/">Toolbox</a></li>
<li id="writeLink"><a href="/eric/writing.html">Writing</a></li>
<li id="speakLink"><a href="/eric/talks/">Speaking</a></li>
<li id="otherLink"><a href="/other/">Leftovers</a></li>
<li id="aboutsite"><a href="/ui/about.html">About this site</a></li>
</ul>
</div>

<div id="footer">
<p class="sosumi">All contents of this site, unless otherwise noted, are &copy;1995-2008 <strong>Eric A. and Kathryn S. Meyer</strong>.  All Rights Reserved.</p>
<p>"<a href="/eric/thoughts/">Thoughts From Eric</a>" is powered by the &uuml;bercool <a href="http://wordpress.org/">WordPress</a></p>
</div>
</body>
</html>
