<?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>CSS Wizardry &#187; CSS</title>
	<atom:link href="http://csswizardry.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://csswizardry.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 11 May 2010 11:00:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Building sites without using IDs or classes</title>
		<link>http://csswizardry.com/2010/04/building-sites-without-using-ids-or-classes/</link>
		<comments>http://csswizardry.com/2010/04/building-sites-without-using-ids-or-classes/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 12:17:09 +0000</pubDate>
		<dc:creator>Harry Roberts</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Semantics]]></category>

		<guid isPermaLink="false">http://csswizardry.com/?p=1216</guid>
		<description><![CDATA[This morning, for one reason or another, I decided to have a go at coding up a page without using any IDs or classes in my markup, and therefore none in my CSS. I&#8217;m not sure why I tried it, I guess I just did&#8230; In order to make it a fairly painless job I [...]]]></description>
			<content:encoded><![CDATA[<p><span class="opener"><span>T</span>his</span> morning, for one reason or another, I decided to have a go at coding up a page without using any IDs or classes in my markup, and therefore none in my CSS. I&#8217;m not sure why I tried it, I guess I just did&#8230; In order to make it a fairly painless job I dove straight into the browser and coded up a simple header, footer, two column layout. <a href="/demos/sites-without-ids-classes/">View the demo</a> and be sure to view the source.</p>
<p><span id="more-1216"></span></p>
<p>Using a combination of more advanced selectors such as sibling and <code>nth-of-type</code> you can target elements based on their position in the markup rather than a given name. The practical upshot of this is that your markup is much leaner and cleaner, removing class and ID names has a notable impact.</p>
<h2>Using advanced selectors</h2>
<p class="marginalia">For a complete list please see <a href="http://www.w3.org/TR/css3-selectors/">http://www.w3.org/TR/css3-selectors/</a></p>
<p>The more advanced selectors take information about an element to determine whether it matches a certain criteria, for example <code>body&gt;div</code> will target a <code>div</code> that is a direct and immediate descendant of the <code>body</code>; <code>p+p</code> will target a paragraph immediately preceded by a paragraph.</p>
<p>On this basis, you could select (for example) your main content <code>div</code> by knowing that it&#8217;s the second <code>div</code> in your content wrapper: <code>body&gt;div div:nth-of-type(2)</code>. Broken down we have:</p>
<ul>
<li><code>body</code>&mdash;sets the root</li>
<li><code>&gt;div</code>&mdash;the first <code>div</code> inside the body (the wrapper <code>div</code>)</li>
<li><code>div:nth-of-type(2)</code>&mdash;the second <code>div</code> in the wrapper (just after the header <code>div</code>).</li>
</ul>
<h2>Why I think this won&#8217;t catch on</h2>
<p class="marginalia">For the time being, let&#8217;s completely disregard that Internet Explorer completely disregards these selectors&#8230;</p>
<p>As you can see from the above example, targeting the single, lone, unique content <code>div</code> has taken two advanced selectors and 27 bytes. The selectors are fixed, the content <code>div</code> will always have to be the second <code>div</code> in the <code>div</code> that is an immediate child of the <code>body</code>. This is incredibly restrictive. Surely <code>#content{&hellip;}</code> is far better than <code>body>div div:nth-of-type(2){&hellip;}</code>&hellip;?</p>
<p>For the sake of ease, instead of rambling about pros and cons, I&#8217;ve simply drawn up a list of advantages and disadvantages:</p>
<h3>Advantages:</h3>
<ul>
<li>Leaner markup.</li>
<li>Promotes more sensible structuring of code.</li>
<li>Promotes semantics.</li>
</ul>
<h3>Disadvantages:</h3>
<ul>
<li>Difficult syntaxes to remember.</li>
<li>Extremely restrictive&mdash;elements are styled based on their location meaning that any moving/restructuring means all styles tied to an element are lost. This leads me on to&#8230;</li>
<li>The CSS is no longer just describing style, it also describes structure. CSS is a styling language, not a markup one.</li>
<li>Arbitrary elements such as images and <code>div</code>s that change depending on page content (blog posts for example) aren&#8217;t fixed enough to be styled based on their structure. This means that any variable content will require IDs and classes anyway, so you might as well us them across the board as opposed to a mix of with and without.</li>
<li>Difficult to understand. I wrote <a href="/demos/sites-without-ids-classes/css/style.css">the CSS for the demo page</a> and I&#8217;m having a hard enough time doing the calculations to work out what does what. Imagine inheriting that!</li>
<li>Jenga. As soon as you alter your markup, the structure dependent CSS will come falling down too, what might be the first child might become the second, making the second child the third and so on, creating a domino effect.</li>
</ul>
<h3>Final word</h3>
<p>While the more advanced CSS(3) selectors are impressive, and incredibly powerful, they aren&#8217;t flexible enough to allow any large dependency upon them. That, and they&#8217;re more awkward to understand than the tried and tested ID/class &#8216;hooks&#8217; we know and use. There are far too many downsides to make cleaner markup a big enough plus-side in my opinion&#8230; Oh, and Internet Explorer doesn&#8217;t seem to honour any of them, but that can&#8217;t have come as much of a surprise.</p>
]]></content:encoded>
			<wfw:commentRss>http://csswizardry.com/2010/04/building-sites-without-using-ids-or-classes/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>Multiple column lists using one &lt;ul&gt;</title>
		<link>http://csswizardry.com/2010/02/mutiple-column-lists-using-one-ul/</link>
		<comments>http://csswizardry.com/2010/02/mutiple-column-lists-using-one-ul/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 23:44:02 +0000</pubDate>
		<dc:creator>Harry Roberts</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Lists]]></category>

		<guid isPermaLink="false">http://csswizardry.com/?p=701</guid>
		<description><![CDATA[This is a quick, simple tutorial on how to create multiple column lists by only using one ul. Often is the case when you&#8217;d want multiple lists side-by-side, but you end up using markup like &#60;ul class=&#34;col&#34;&#62; in order to get several lists sat next to each other. However, by simply floating lis left and [...]]]></description>
			<content:encoded><![CDATA[<p><span class="opener"><span>T</span>his</span> is a quick, simple tutorial on how to create multiple column lists by only using one <code>ul</code>. Often is the case when you&#8217;d want multiple lists side-by-side, but you end up using markup like <code>&lt;ul class=&quot;col&quot;&gt;</code> in order to get several lists sat next to each other. However, by simply floating <code>li</code>s left and setting their width to the correct percentage (two columns = <code>li{width:50%;}</code> and so on), you can attain a multiple column list pretty easily.</p>
<h2><a href="http://csswizardry.com/demos/multiple-column-lists/">View demo</a></h2>
<p><span id="more-701"></span></p>
<p>The trick here is to force the list to break at the right point. If you want two columns, you need to float the list items left and set them at 50% width, therefore the list items will only ever fit two side-by-side, then begin again on the row beneath. By that token, three columns would require a width of 33% and floated left, four would be 25% and so on.</p>
<h2>The code</h2>
<p>Both the markup and CSS for this is incredibly simple, nothing fancy, no CSS3, nothing progressive, just basic styling applied to lean markup.</p>
<h3>The markup</h3>
<p>The markup for this is just a simple <code>ul</code>, thus:</p>
<pre><code>&lt;ul id=&quot;double&quot;&gt; <span class="code-comment">&lt;!-- Alter ID accordingly --&gt;</span>
  &lt;li&gt;CSS&lt;/li&gt;
  &lt;li&gt;XHTML&lt;/li&gt;
  &lt;li&gt;Semantics&lt;/li&gt;
  &lt;li&gt;Accessibility&lt;/li&gt;
  &lt;li&gt;Usability&lt;/li&gt;
  &lt;li&gt;Web Standards&lt;/li&gt;
  &lt;li&gt;PHP&lt;/li&gt;
  &lt;li&gt;Typography&lt;/li&gt;
  &lt;li&gt;Grids&lt;/li&gt;
  &lt;li&gt;CSS3&lt;/li&gt;
  &lt;li&gt;HTML5&lt;/li&gt;
  &lt;li&gt;UI&lt;/li&gt;
&lt;/ul&gt;</code></pre>
<p>And to make this into a multiple column list:</p>
<pre><code>ul{
  width:760px;
  margin-bottom:20px;
  overflow:hidden;
  border-top:1px solid #ccc;
}
li{
  line-height:1.5em;
  border-bottom:1px solid #ccc;
  float:left;
  display:inline;
}
#double li  { width:50%;} <span class="code-comment">/* 2 col */</span>
#triple li  { width:33.333%; } <span class="code-comment">/* 3 col */</span>
#quad li    { width:25%; } <span class="code-comment">/* 4 col */</span>
#six li     { width:16.666%; } <span class="code-comment">/* 6 col */</span></code></pre>
<h2>When to use this</h2>
<p class="marginalia">Use this wisely&#8230; It displays content in an ambiguous manner and should not be used where order of reading is imperative.</p>
<p>This method should only be used if the lists content doesn&#8217;t require any specific ordering as the markup is written linearly and the list is displayed in a matrix. As you can see, the way the content is displayed means it can be read across&raquo;down&raquo;across or down&raquo;up&raquo;down. This means that the way you write your content is not necessarily the way it will be read. In <a href="/demos/multiple-column-lists/">my example</a> this isn&#8217;t an issue, as the content can safely be read in any order.</p>
]]></content:encoded>
			<wfw:commentRss>http://csswizardry.com/2010/02/mutiple-column-lists-using-one-ul/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>iPhone CSS&#8212;tips for building iPhone websites</title>
		<link>http://csswizardry.com/2010/01/iphone-css-tips-for-building-iphone-websites/</link>
		<comments>http://csswizardry.com/2010/01/iphone-css-tips-for-building-iphone-websites/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 20:17:10 +0000</pubDate>
		<dc:creator>Harry Roberts</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://csswizardry.com/?p=489</guid>
		<description><![CDATA[With the rapid rise in mobile browsers, it has probably never been more important to ensure your sites can be handled on these platforms. By far one of the most popular such browsers is Mobile Safari on the iPhone&#8212;this is one of the easiest browsers to develop for: it runs on Webkit (meaning a lot [...]]]></description>
			<content:encoded><![CDATA[<p><span class="opener"><span>W</span>ith</span> the rapid rise in mobile browsers, it has probably never been more important to ensure your sites can be handled on these platforms. By far one of the most popular such browsers is Mobile Safari on the iPhone&mdash;this is one of the easiest browsers to develop for: it runs on Webkit (meaning a lot of rich CSS3 support) and it&#8217;s only ever on one resolution and on one OS.</p>
<p class="marginalia"><ins datetime="2010-02-02T10:26:37+00:00"><strong>N.B.</strong> This article addresses iPhone development and iPhone development only. There is no reason why you cannot or should not develop for other mobile devices and platforms, Apple or otherwise. <em>This just happens to be an iPhone only post</em>.</ins></p>
<p>The practical upshot of this is that you need to do no cross-browser testing, and can use all the <a href="/css3/">CSS3</a> you like. This post will show you some of the basics of developing and designing websites for the iPhone and Mobile Safari.</p>
<p><span id="more-489"></span></p>
<h2>To start</h2>
<p>The first thing to remember when developing a site to be displayed on an iPhone is that it is <em>very</em> similar to designing a print stylesheet. <em>You need to linearise everything.</em> Make sure you have one column and everything is read in one line&mdash;straight from top to bottom. This will also put your markup writing skills to the test.</p>
<p class="marginalia">Some people don&#8217;t agree with browser sniffing, but you need to detect the iPhone somehow.</p>
<p>This first bit of code is a PHP browser sniffing snippet, the actual CSS we&#8217;ll use is not brought through via any server side code, we&#8217;ll use some CSS media queries for that. What we&#8217;ll use this code for is serving the markup with an iPhone specific meta tag and to shorten the current page&#8217;s title.</p>
<pre><code>&lt;?php
  $browser = strpos($_SERVER['HTTP_USER_AGENT'],&quot;iPhone&quot;);
    if ($browser == true){
    $browser = 'iphone';
  }
?&gt;</code></pre>
<p>What the above code does is sees if the user agent contains any instance of &#8216;iPhone&#8217; using <a href="http://uk2.php.net/strpos">the <code>strpos</code> PHP function</a>. Place this piece of code at the very top of your header include, before any other markup. In order to action something if the browser <em>is</em> an iPhone, simply use the following bit of PHP logic in the place you want it to be initiated:</p>
<pre><code>&lt;?php if($browser == 'iphone'){ ?&gt;DO THIS&lt;?php } ?&gt;</code></pre>
<p class="marginalia">We want people to save your site to their home screen&#8230;</p>
<p>Now, to put that snippet to use. We want to do two things with this little piece of PHP.</p>
<h3>Saving to the homescreen&mdash;shortening the page title</h3>
<p><img src="http://csswizardry.com/wp-content/uploads/2010/01/iphone-01.jpg" alt="An iPhone screenshot of the CSS Wizardry home screen icon" width="160" height="160" class="left" /></p>
<p>First off, we&#8217;d like users to be able to save a link to your site on their home screen, this is simple enough, they simply need to select to do so from within the browser. However, if you look at the title of my home page alone, it&#8217;s quite long: <q>CSS Wizardry&mdash;CSS, Web Standards, Typography, and Grids by Harry Roberts</q>. This would never fit underneath an icon without being shortened, so we need to serve a different title to the iPhone only. To achieve this we us the PHP snippet like so:</p>
<pre><code>&lt;?php if($browser == 'iphone'){ ?&gt;
  &lt;title&gt;Short iPhone only title&lt;/title&gt;
&lt;?php }else{ ?&gt;
  &lt;title&gt;Regular title&lt;/title&gt;
&lt;?php } ?&gt;</code></pre>
<p>Now, both when browsing and saving your site to their home screen, a user will only ever see the shortened version.</p>
<h4>The home screen icon</h4>
<p>Actually making the icon is very simple. All you need to do is upload a 57&#215;57px icon (usually a larger version of your favicon) to your server root. The icon must be named <code>apple-touch-icon.png</code>, and the iPhone will sort the rest out. See <a href="http://csswizardry.com/apple-touch-icon.png" title="Link to a png iPhone icon">my icon</a>.</p>
<h3>Stopping user pinch-zooming</h3>
<p>The second use for the PHP snippet is to serve the iPhone a meta tag which disables the user pinch-zoom that Mobile Safari offers:</p>
<pre><code>&lt;?php if($browser == 'iphone'){ ?&gt;
  &lt;meta name=&quot;viewport&quot;
  content=&quot;width=device-width,
  minimum-scale=1.0, maximum-scale=1.0&quot; /&gt;
&lt;?php } ?&gt;</code></pre>
<p>This means that, once we&#8217;ve linearised the content and sorted the font sizing, the user will only ever have to traverse down your page, much like a native app.</p>
<h2>Beginning styling</h2>
<p class="marginalia">Some developers prefer to redirect iPhone users to a totally different version of the site&mdash;we won&#8217;t be doing that.</p>
<p>We could use the PHP snippet to serve the iPhone a whole new stylesheet, or even send the user to a whole new site, rather like Twitter does (<a href="http://m.twitter.com/">m.twitter.com</a>). However, there&#8217;s a simpler way to do it using some CSS media queries. The advantage of this is that you&#8217;re simply reusing old content and pre-written markup, and only ever using one CSS file.</p>
<p>The first thing you need to do is make sure the HTML link element that points to your main stylesheet does <strong>not</strong> have a <code>media</code> attribute:</p>
<pre><code>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/path/to/style.css&quot; /&gt;</code></pre>
<p>Next, we&#8217;re going to use <a href="http://csswizardry.com/quick-tips/#tip-15" title="Quick Tip on combining CSS media types in one CSS file">Quick Tip #15</a> that I wrote on my Quick Tips page. This means that we can just add our iPhone styles directly onto the end of the main stylesheet, and inherit all the styles set for desktop viewing:</p>
<pre><code><span class="code-comment">/*--- Main CSS here ---*/</span>

<span class="code-comment">/*------------------------------------*\
	IPHONE
\*------------------------------------*/</span>
@media screen and (max-device-width: 480px){
<span class="code-comment">/*--- iPhone only CSS here ---*/</span>
}
</code></pre>
<p>Now any CSS before the media query will be used across all platforms, but anything between the query will be used by any screen media with a maximum screen size of 480px (i.e. an iPhone).</p>
<h3>Things to remember</h3>
<p>There are a few key things to remember when developing CSS for the iPhone:</p>
<ul>
<li>Avoid explicit absolute widths&mdash;where possible you should use percentage widths.</li>
<li>Linearise everything&mdash;where possible, remove all floats. We want no content side-by-side unnecessarily.</li>
</ul>
<p>The first thing to do is to set the <code>-webkit</code> proprietary CSS <code>-webkit-text-size-adjust</code> on the body which will resize the text for you, meaning you shouldn&#8217;t have to touch any font sizes yourself. Also, if your body copy is set in a sans font such as Arial, now is your chance to use some Helvetica&mdash;for normal sites, Helvetica should not be used as body copy as it renders hideously on a PC. Take advantage of the fact that you can guarantee its presence and quality on an iPhone. Change your <code>font-family</code>:</p>
<pre><code><span class="code-comment">/*--- Main CSS here ---*/</span>

<span class="code-comment">/*------------------------------------*\
	IPHONE
\*------------------------------------*/</span>
@media screen and (max-device-width: 480px){
body{
  -webkit-text-size-adjust:none;
  font-family:Helvetica, Arial, Verdana, sans-serif;
  padding:5px;
}
}
</code></pre>
<p>Above, I also added a small padding to make sure nothing touches the edge of the browser. All wrapper and content <code>div</code>s from here on in should be set to <code>width:100%;</code> making them the whole width of the screen, minus 10px.</p>
<h3>Structure</h3>
<p>Now, as all layouts differ I am going to assume a similar one to mine, a simple two column set up with a logo and menu in the header. If your layout is different I am sure you can quite easily retrofit it. As I mentioned before, remove all stylistic <code>float</code>s and set all widths to <code>100%</code>. If you are using <code>div</code>s sensibly (i.e. for large bodies of content and not for nav items) this code should see you right for linearising the content:</p>
<pre><code>@media screen and (max-device-width: 480px){
body{...}
div{
  clear:both!important;
  display:block!important;
  width:100%!important;
  float:none!important;
  margin:0!important;
  padding:0!important;
}
}
</code></pre>
<p>That will force all <code>div</code>s to rest one on top of the other, full width and in order. You have begun linearising all your content.</p>
<h3>The navigation</h3>
<p>If you have a navigation menu in which all the items are floated and made horizontal, insert the following:</p>
<pre><code>@media screen and (max-device-width: 480px){
body{...}
div{...}
#nav,#nav li{
  float:none!important;
  clear:both!important;
  margin:0 0 20px 0!important;
  display:block;
  padding:0;
  text-align:left!important;
  width:100%;
}
#nav{
  border:1px solid #ccc;
  padding:5px;
  -webkit-border-radius:5px;
}
#nav li{
  margin:0!important;
}
#nav li a{
  display:block;
}
}
</code></pre>
<p><img src="http://csswizardry.com/wp-content/uploads/2010/01/iphone-02.jpg" alt="A screenshot of the CSS Wizardry navigation menu on an iPhone" width="320" height="142" class="left" /></p>
<p>This then will give you a vertical navigation menu which has a 100% width and the actual links themselves have a larger hit area (applied via <code>display:block;</code>), meaning that it&#8217;s prominent at the top of each page and easier for users to select single items.</p>
<h3>Images</h3>
<p>As images inherently have a set pixel width (i.e. their own width) there is a high chance that they will break out of the wrapper area (as a lot of images will be above 480px wide). To combat this simply add the following:</p>
<pre><code>@media screen and (max-device-width: 480px){
body{...}
div{...}
#nav,#nav li{...}
img{
  max-width:100%;
  height:auto;
}
}
</code></pre>
<p>Other than elements very specific to my site, that is pretty much <a href="/wp-content/themes/default/style.css" title="Link to the CSS Wizardry CSS file">all the CSS I use to quickly size and linearise my content</a>. Any elements specific to your own site will obviously need considering on a case-by-case basis, but if you remember to not set absolute widths and to always linearise your content then it should be a doddle. Oh and it&#8217;s a great time to use some guaranteed <a href="/css3/" title="A CSS3 and Progressive Enhancement examples page I created">CSS3</a>.</p>
<p>View <a href="http://csswizardry.com/wp-content/uploads/2010/01/iphone-03.jpg" title="Link to a 250KB JPG file">a screenshot of an entire page of CSS Wizardry</a> on an iPhone.</p>
<p>Do you have an iPhone version of your site? Have you any more tips you&#8217;d like to add? Please do so in the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://csswizardry.com/2010/01/iphone-css-tips-for-building-iphone-websites/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
		<item>
		<title>Typographic work planner</title>
		<link>http://csswizardry.com/2009/12/typographic-work-planner/</link>
		<comments>http://csswizardry.com/2009/12/typographic-work-planner/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 11:17:25 +0000</pubDate>
		<dc:creator>Harry Roberts</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Semantics]]></category>

		<guid isPermaLink="false">http://csswizardry.com/?p=49</guid>
		<description><![CDATA[No one likes being told what to do, especially if it&#8217;s work related, but nevertheless jobs need done. Why present boring stuff in a boring way? If you&#8217;re going to be told what to do, at least soften the blow by being told nicely. Enter this, a little HTML/CSS typographic work planner. By using some [...]]]></description>
			<content:encoded><![CDATA[<p><span class="opener"><span>N</span>o one</span> likes being told what to do, especially if it&#8217;s work related, but nevertheless jobs need done. Why present boring stuff in a boring way? If you&#8217;re going to be told what to do, at least soften the blow by being told nicely. Enter this, a little HTML/CSS typographic work planner. By using some super-semantic HTML and a dash of CSS you can craft a beautiful looking yet incredibly simple work planner for you and your staff.</p>
<p><a style="background:none;" title="View a working demo of the typographic work planner" href="http://csswizardry.com/demos/typographic-work-planner/"><img class="full" src="http://csswizardry.com/wp-content/uploads/2009/12/table.jpg" alt="Screenshot of the typographic work planner" width="640" height="367" /></a></p>
<p><span id="more-49"></span></p>
<h2>Typographic work planner markup:</h2>
<p>The rich, semantic markup is as follows. Notice the use of the more semantic elements and attributes such as <code>summary=""</code>, <code>colgroup</code>, <code>scope=""</code>, <code>caption</code> and more&#8230;</p>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
&lt;head&gt;
  &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8" /&gt;

  &lt;title&gt;Typographic work planner&lt;/title&gt;

  &lt;link rel="stylesheet" type="text/css" href="css/style.css" /&gt;
&lt;/head&gt;
&lt;body id="home"&gt;
  &lt;div id="wrapper"&gt;
    &lt;table summary="An overview of upcoming and recently completed work ?
    by employees"&gt;
      &lt;caption&gt;Work schedule&lt;/caption&gt;
      &lt;colgroup&gt;
        &lt;col id="date" /&gt;
        &lt;col id="user" /&gt;
        &lt;col id="dec" /&gt;
      &lt;/colgroup&gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;th scope="col"&gt;Date&lt;/th&gt;
          &lt;th scope="col"&gt;User&lt;/th&gt;
          &lt;th scope="col"&gt;Description&lt;/th&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tfoot&gt;
        &lt;tr&gt;
          &lt;td colspan="3"&gt;Sense Internet Ltd work planner&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tfoot&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td class=&quot;date&quot;&gt;20 December, 2009&lt;/td&gt;
          &lt;td class=&quot;user&quot;&gt;Harry Roberts&lt;/td&gt;
          &lt;td class=&quot;desc&quot;&gt;Lorem ipsum dolor sit amet, elit. Nunc ?
          rhoncus dui et mauris. Nam augue felis, dapibus ut, condimentum ?
          in, ornare a, est. Proin sem risus, pretium ut, mattis nec.&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td class=&quot;date&quot;&gt;20 December, 2009&lt;/td&gt;
          &lt;td class=&quot;user&quot;&gt;Joe Whitley&lt;/td&gt;
          &lt;td class=&quot;desc&quot;&gt;Suspendisse venenatis. Donec eleifend ?
          dignissim diam. Integer faucibus neque tempor pede. Maecenas at ?
          magna sed lectus adipiscing molestie. Pellentesque habitant morbi ?
          tristique senectus et netuset malesuada fames ac turpis egestas. ?
          Curabitur sodales gravida tellus.&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td class=&quot;date&quot;&gt;21 December, 2009&lt;/td&gt;
          &lt;td class=&quot;user&quot;&gt;Harry Roberts&lt;/td&gt;
          &lt;td class=&quot;desc&quot;&gt;Lorem ipsum dolor sit amet, elit. Nunc ?
          rhoncus dui et mauris. Nam augue felis, dapibus ut, condimentum ?
          in, ornare a, est. Proin sem risus, pretium ut, mattis nec.&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td class=&quot;date&quot;&gt;21 December, 2009&lt;/td&gt;
          &lt;td class=&quot;user&quot;&gt;Joe Whitley&lt;/td&gt;
          &lt;td class=&quot;desc&quot;&gt;Suspendisse venenatis. Donec eleifend ?
          dignissim diam. Integer faucibus neque tempor pede. Maecenas at ?
          magna sed lectus adipiscing molestie. Pellentesque habitant morbi ?
          tristique senectus et netuset malesuada fames ac turpis egestas. ?
          Curabitur sodales gravida tellus.&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td class=&quot;date&quot;&gt;21 December, 2009&lt;/td&gt;
          &lt;td class=&quot;user&quot;&gt;Sam Penrose&lt;/td&gt;
          &lt;td class=&quot;desc&quot;&gt;Lorem ipsum dolor sit amet, elit. Nunc ?
          rhoncus dui et mauris. Nam augue felis, dapibus ut, condimentum ?
          in, ornare a, est. Proin sem risus, pretium ut, mattis nec.&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr class="today"&gt;
          &lt;td class=&quot;date&quot;&gt;22 December, 2009&lt;/td&gt;
          &lt;td class=&quot;user&quot;&gt;Joe Whitley&lt;/td&gt;
          &lt;td class=&quot;desc&quot;&gt;Suspendisse venenatis. Donec eleifend ?
          dignissim diam. Integer faucibus neque tempor pede. Maecenas at ?
          magna sed lectus adipiscing molestie. Pellentesque habitant morbi ?
          tristique senectus et netuset malesuada fames ac turpis egestas. ?
          Curabitur sodales gravida tellus.&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr class="today"&gt;
          &lt;td class=&quot;date&quot;&gt;22 December, 2009&lt;/td&gt;
          &lt;td class=&quot;user&quot;&gt;Sam Penrose&lt;/td&gt;
          &lt;td class=&quot;desc&quot;&gt;Lorem ipsum dolor sit amet, elit. Nunc ?
          rhoncus dui et mauris. Nam augue felis, dapibus ut, condimentum ?
          in, ornare a, est. Proin sem risus, pretium ut, mattis nec.&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr class="today"&gt;
          &lt;td class=&quot;date&quot;&gt;22 December, 2009&lt;/td&gt;
          &lt;td class=&quot;user&quot;&gt;Joe Whitley&lt;/td&gt;
          &lt;td class=&quot;desc&quot;&gt;Suspendisse venenatis. Donec eleifend ?
          dignissim diam. Integer faucibus neque tempor pede. Maecenas at ?
          magna sed lectus adipiscing molestie. Pellentesque habitant morbi ?
          tristique senectus et netuset malesuada fames ac turpis egestas. ?
          Curabitur sodales gravida tellus.&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
  &lt;/body&gt;
&lt;/html&gt;</pre>
<h3>In detail&#8230;</h3>
<p>There are a few things in the table you may not have seen before, briefly, they are:</p>
<ul>
<li><strong><code>summary=""</code>:</strong> This is an attribute which provides a brief overview of the table and its contents/purpose.</li>
<li><strong><code>caption</code>:</strong> This is a table specific caption, essentially a heading/title explicitly for the table.</li>
<li><strong><code>colgroup</code> and <code>col</code>:</strong> This is an essentially invisible element that just adds semantic meaning to the table. It defines the columns and can—in some browsers—be used to style them.</li>
<li><strong><code>scope="col"</code>:</strong> This is an attribute which tells the browser whether the <code>th</code> is a title for a column or a row. This then obviously makes the other possible attribute value <code>row</code>.</li>
<li><strong><code>tfoot</code>:</strong> This is a table footer and contain pretty much anything you like. It must however appear <em>before</em> the <code>tbody</code>.</li>
</ul>
<h2>Typographic work planner CSS:</h2>
<p>The CSS used to create the work planner is pretty basic, with a dash or progressive enhancement added via some CSS3. <a href="http://csswizardry.com/demos/typographic-work-planner/css/style.css">View the full CSS file with reset etc.</a></p>
<pre><code>table{
  margin-bottom:20px;
}
td,th{
  border-bottom:1px solid #ccc;
}
tbody tr{
  background:#fff;
}
tbody tr:nth-of-type(even){
  background:#ffc;
}
th,tfoot,caption{
  font-family:Helvetica, Arial, Verdana, sans-serif;
  font-size:1.6em;
  font-weight:bold;
}
th,td{
  padding:10px 0;
}
caption{
  font-size:2.4em;
  position:absolute;
  left:-9999px;
}
.date{
  width:160px;
  padding:10px 15px 10px 5px;
  font-family:Georgia, "Times New Roman", Times;
  font-size:1.6em;
  font-style:italic;
}
.user{
  width:460px;
  padding-right:20px;
  font-family:Helvetica, Arial, Verdana, sans-serif;
  font-size:4.8em;
  font-weight:bold;
}
.desc{
  width:280px;
  font-size:1.2em;
}
tbody tr.today{
  background:#ff8;

  text-shadow:1px 1px 1px rgba(0,0,0,0.3);
}
tfoot{
  color:#666;
}
tfoot td{
  padding:10px 5px;
}</code></pre>
<h2><a href="http://csswizardry.com/demos/typographic-work-planner/">Typographic work planner demo</a></h2>
]]></content:encoded>
			<wfw:commentRss>http://csswizardry.com/2009/12/typographic-work-planner/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
	</channel>
</rss>
