<?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; CSS3</title>
	<atom:link href="http://csswizardry.com/tag/css3/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>A quick note on border radius</title>
		<link>http://csswizardry.com/2010/03/a-quick-note-on-border-radius/</link>
		<comments>http://csswizardry.com/2010/03/a-quick-note-on-border-radius/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 10:34:55 +0000</pubDate>
		<dc:creator>Harry Roberts</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Border Radius]]></category>
		<category><![CDATA[CSS3]]></category>

		<guid isPermaLink="false">http://csswizardry.com/?p=853</guid>
		<description><![CDATA[This is a quick post concerning the border-radius CSS3 property, and the syntax behind it. After coming across this site earlier today via Twitter I remembered my initial frustrations with lack of uniformity across user agents and their required syntax in order to create round corners; Firefox requiring a different format to Webkit and the [...]]]></description>
			<content:encoded><![CDATA[<p><span class="opener"><span>T</span>his</span> is a quick post concerning the <code>border-radius</code> CSS3 property, and the syntax behind it. After coming across <a href="http://www.border-radius.com/">this site</a> earlier today via <a href="http://twitter.com/csswizardry" title="Harry Roberts on Twitter">Twitter</a> I remembered my initial frustrations with lack of uniformity across user agents and their required syntax in order to create round corners; Firefox requiring a different format to Webkit and the CSS3 spec was pretty annoying.</p>
<p><span id="more-853"></span></p>
<p>However, it&#8217;s not all that bad. As border-radius.com would have you believe, the syntax to create an element with top&ndash;left and bottom&ndash;right corners with a 50px round, and top&ndash;right and bottom&ndash;left corners with 10px rounds would be:</p>
<pre><code>-webkit-border-radius: 50px;
-webkit-border-top-right-radius: 10px;
-webkit-border-bottom-left-radius: 10px;
-moz-border-radius: 50px;
-moz-border-radius-topright: 10px;
-moz-border-radius-bottomleft: 10px;
border-radius: 50px;
border-top-right-radius: 10px;
border-bottom-left-radius: 10px;</code></pre>
<p>Wrong, you can actually use the <code>border-radius</code> shorthand to nail this in three lines:</p>
<pre><code>-moz-border-radius:50px 10px 50px 10px;
-webkit-border-radius:50px 10px 50px 10px;
border-radius:50px 10px 50px 10px;</code></pre>
<p>The sytanx follows the following rule: <code>border-radius:top&ndash;left top&ndash;right bottom&ndash;right bottom&ndash;left;</code>. I&#8217;ve tested this in Firefox (<code>-moz-border-radius</code>), Webkit (<code>-webkit-border-radius</code>) and Opera (<code>border-radius</code>) and <a href="http://csswizardry.com/demos/border-radius/" title="Border radius demo">it works just fine</a>.</p>
<h2><ins datetime="2010-03-02T10:44:38+00:00">Addendum</ins></h2>
<p>You&#8217;d think Webkit would just be Webkit, right? Wrong. This works in Chrome but <em>not</em> Safari. I&#8217;ve had reports that Safari 4.0.4 (I guess it&#8217;s <em>not found it</em>, get it? Oh never mind.) doesn&#8217;t work. Useful&#8230;</p>
<p>Still, this version will work, and is still considerably shorter:</p>
<pre><code>-webkit-border-radius: 50px;
-webkit-border-top-right-radius: 10px;
-webkit-border-bottom-left-radius: 10px;
-moz-border-radius:50px 10px 50px 10px;
border-radius:50px 10px 50px 10px;</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://csswizardry.com/2010/03/a-quick-note-on-border-radius/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>CSS bar charts&#8212;styling data with CSS3 and progressive enhancement</title>
		<link>http://csswizardry.com/2010/02/css-bar-charts-styling-data-with-css3-and-progressive-enhancement/</link>
		<comments>http://csswizardry.com/2010/02/css-bar-charts-styling-data-with-css3-and-progressive-enhancement/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 23:59:27 +0000</pubDate>
		<dc:creator>Harry Roberts</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Data Visualisation]]></category>
		<category><![CDATA[Progressive Enhancement]]></category>

		<guid isPermaLink="false">http://csswizardry.com/?p=601</guid>
		<description><![CDATA[Bar charts in CSS are neither very new, or very difficult. Using some pretty basic styling you can force lists etc into resembling graphs and charts fairly easily. Such charts, in their most basic form, work perfectly well in displaying and presenting the data they represent. However, using some rich CSS3 and progressive enhancement, you [...]]]></description>
			<content:encoded><![CDATA[<p><span class="opener"><span>B</span>ar charts</span> in CSS are neither very new, or very difficult. Using some pretty basic styling you can force lists etc into resembling graphs and charts fairly easily. Such charts, in their most basic form, work perfectly well in displaying and presenting the data they represent. However, using some rich CSS3 and progressive enhancement, you can really start pushing the display and presentation of these normally boring documents to the next level. They are also an ideal way in which to demonstrate the power and ability of progressive enhancement.</p>
<h2><a href="/demos/graphs/">View demo</a></h2>
<p><span id="more-601"></span></p>
<p class="marginalia"><strong>Look at the site in IE8, <em>then</em> Firefox, <em>then</em> Safari/Chrome.</strong> Keep refreshing.</p>
<p>I have created <a href="/demos/graphs/">a demo page</a> which simply represents three items of data expressed as percentages. It is not the data itself or the numbers we are concerned with here&mdash;it is the proof of concept. The fact that this can be done on my made up data shows that you can do it too, on real life information.</p>
<h2>Progressive enhancement</h2>
<p class="marginalia">At <a href="http://venturelab.co.uk/">Venturelab</a>, we decided to use progressive enhancement as a matter of course. CSS3 and designing in the browser all the way!</p>
<p>Progressive enhancement is, in my opinion, one of the most exciting schools of thought web development has seen in years (though I <em>have</em> only been in the web for three&#8230;). It is the idea whereby any non-essential features (i.e. anything whose absence will have no adverse effect on the usability or accessibility of a website) are added to the website in a <em>progressive</em> manner&mdash;usually through CSS3.</p>
<p>The benchmark example is rounded corners; to apply these through old means, for example with images, would have taken a developer a substantial amount of time&mdash;time the client is paying for. It seems silly now to think that way-back-when, putting rounded corners on a <code>div</code> might have taken upward of 30 minutes, when we can apply it in about 5 seconds using <code>-moz-border-radius:5px;</code>.</p>
<p>It really is a no brainer&mdash;anyone visiting the site in a browser with no CSS3 support will see square corners. Does this matter? Of course it doesn&#8217;t. No one visits a site to look solely at the design&mdash;they visit for content. Does it matter to them what shape the corners of your RSS button are? No again. Progressive enhancement saves you time, and your client money.</p>
<h3>Isn&#8217;t this just graceful degradation?</h3>
<p class="marginalia">Graceful degradation = building for the best and getting worse; progressive enhancement = building to cater the worst and getting better&#8230;</p>
<p>The line between progressive enhancement and graceful degradation is fine but significant. Graceful degradation is the idea that you&#8217;d build a site for, say, Firefox, then selectively break and <em>downgrade</em> it in the likes of IE(6). Progressive enhancement takes a much more positive attitude in that you build <em>for</em> IE(6) and then selectively <em>upgrade</em> it in browsers like Firefox and Safari. It&#8217;s no longer starting great and getting worse, it&#8217;s now starting great and getting better.</p>
<h3>Internet Explorer</h3>
<p class="marginalia"><strong>N.B.</strong> Only tested in IE8 as this is not a final solution, rather a proof-of-concept.</p>
<p>Internet Explorer(8)&#8217;s take on my bar charts is as you&#8217;d expect from any browser, it renders it perfectly well, providing clear, accessible content, with a flawless UX and perfectly usable. <em>This is not bad!</em> We don&#8217;t need to downgrade anything, this is our starting point. It looks good and it functions perfectly. If you did as above and visited in IE8 first, you wouldn&#8217;t know that there were round corners missing&mdash;because that <em>doesn&#8217;t</em> matter.</p>
<p><img src="http://csswizardry.com/wp-content/uploads/2010/02/ie.gif" alt="A screenshot of the CSS bar chart in Internet Explorer 8" width="640" height="92" class="full" /></p>
<h3>Firefox</h3>
<p>Next up is Firefox, where we add some round corners to the blue bars, and also a very subtle drop shadow (<code>text-shadow:;</code>) on the text. This is no more usable than before, the content is no more accessible than in IE, but it <em>does</em> look a tad nicer.</p>
<p><img src="http://csswizardry.com/wp-content/uploads/2010/02/firefox.gif" alt="A screenshot of the CSS bar chart in Firefox" width="640" height="92" class="full" /></p>
<h3>Safari/Chrome</h3>
<p>It is in Webkit based browsers such as Safari and Chrome that the real magic happens. Webkit&#8217;s proprietary CSS is above and beyond that of any other rendering engine&#8230;</p>
<p><img src="http://csswizardry.com/wp-content/uploads/2010/02/safari.gif" alt="A screenshot of the CSS bar chart in Safari" width="640" height="92" class="full" /></p>
<p>What if I couldn&#8217;t be bothered opening Photoshop to make a subtle gradient <code>.gif</code> for the bars? No worries, use Webkit&#8217;s gradient CSS. A little reflection might look nice on the bars too, but I don&#8217;t fancy any superfluous markup or <code>.png</code>s to fiddle with. Ah great, Webkit has a bit of reflection CSS too.</p>
<p>However, for the real show-piece, the Webkit animation. I&#8217;m not using any Javascript libraries anywhere else in the page so I don&#8217;t fancy pulling a whole one in for something that won&#8217;t really be missed if it&#8217;s not there. I hear Webkit has animations&#8230; magic!</p>
<h2>The code</h2>
<p>Now that&#8217;s the theory covered, let&#8217;s look at what does all this stuff&#8230; Please note, I have used some PHP to randomise the values used by the bars of the chart. As a result, some CSS appears in the source code of the PHP file, and the rest in <a href="http://csswizardry.com/demos/graphs/css/style.css" title="The CSS file which powers the CSS3 bar chart">the page&#8217;s CSS file</a>. The code shown in the examples below is condensed into one large chunk.</p>
<h3>The markup</h3>
<p>The markup simply comprises of one uncluttered <code>dl</code>. The reasoning behind a definition list is that each item is a title, followed by some information about that title. Not only is this semantically correct, it&#8217;s a nice set of elements to be working with to achieve the layout we&#8217;ve got.</p>
<pre><code>&lt;dl id=&quot;chart&quot;&gt;
  &lt;dt&gt;Sales increase this week&lt;/dt&gt;
  &lt;dd&gt;&lt;span id=&quot;data-one&quot;&gt;47%&lt;/span&gt;&lt;/dd&gt;
  &lt;dt&gt;Revenue increase this week&lt;/dt&gt;
  &lt;dd&gt;&lt;span id=&quot;data-two&quot;&gt;59%&lt;/span&gt;&lt;/dd&gt;
  &lt;dt&gt;Profit increase this week&lt;/dt&gt;
  &lt;dd&gt;&lt;span id=&quot;data-three&quot;&gt;26%&lt;/span&gt;&lt;/dd&gt;
&lt;/dl&gt;</code></pre>
<p>That&#8217;s all there is to it.</p>
<h3>The CSS, CSS3 and progressive enhancement</h3>
<pre><code><span class="code-comment">/*------------------------------------*\
  CHART
\*------------------------------------*/</span>
#chart{
  width:520px;
}
#chart dt{
  width:160px;
  float:left;
  margin:0 20px 5px 0;
  padding:2px 0;
  display:inline;
  font-weight:bold;
  text-align:right;
}
#chart dd{
  width:339px;
  border-right:1px solid #ddd;
  float:left;
  margin-bottom:5px;
  display:inline;
}
#chart dd span{
  color:#fff;
  background:#09f;
  text-align:center;
  padding:2px 0;
  display:block;

  text-shadow:1px 1px 1px rgba(0,0,0,0.2);
  -moz-border-radius:2px;
  -webkit-border-radius:2px;
  border-radius:2px;
  background:-webkit-gradient(linear, left top, &rarr;
  left bottom, from(#09f), to(#077fd0));
  -webkit-box-reflect:below 0 &rarr;
  -webkit-gradient(linear, left top, &rarr;
  left bottom, from(rgba(0,0,0,0)), to(rgba(0,0,0,0.25)));
}
#data-one{
  width:47%;
}
#data-two{
  width:59%;
}
#data-three{
  width:26%;
}
#data-one{
  -webkit-animation-name:bar-one; <span class="code-comment">/* Give the bar an animation with a
    unique name */</span>
}
#data-two{
  -webkit-animation-name:bar-two; <span class="code-comment">/* Give the bar an animation with a
    unique name */</span>
}
#data-three{
  -webkit-animation-name:bar-three; <span class="code-comment">/* Give the bar an animation with a
    unique name */</span>
}
#data-one,#data-two,#data-three{ <span class="code-comment">/* Define animation styles for all three
    bars at once */</span>
  -webkit-animation-duration:0.5s; <span class="code-comment">/* Animation duration in seconds */</span>
  -webkit-animation-iteration-count:1; <span class="code-comment">/* Amount of times to loop */</span>
  -webkit-animation-timing-function:ease-out; <span class="code-comment">/* Ease in, out etc. */</span>
}
@-webkit-keyframes bar-one{
  0%{ <span class="code-comment">/* Define bar-one styles at 0% (0 seconds) */</span>
    width:0%;
  }
  100%{ <span class="code-comment">/* Define bar-one styles at 100% (0.5 seconds) */</span>
    width:47%;
  }
}
@-webkit-keyframes bar-two{
  0%{ <span class="code-comment">/* Define bar-two styles at 0% (0 seconds) */</span>
    width:0%;
  }
  100%{ <span class="code-comment">/* Define bar-two styles at 100% (0.5 seconds) */</span>
    width:59%;
  }
}
@-webkit-keyframes bar-three{
  0%{ <span class="code-comment">/* Define bar-three styles at 0% (0 seconds) */</span>
    width:0%;
  }
  100%{ <span class="code-comment">/* Define bar-three styles at 100% (0.5 seconds) */</span>
    width:26%;
  }
}</code></pre>
<h4>In detail</h4>
<p>There may well be some bits in there that you&#8217;re not familiar with, particularly CSS animations. Basically, to animate an element you need to do a few things:</p>
<ol>
<li>Assign the element an animation name. This name is the &#8216;hook&#8217; to link an animation, defined later, to an element.
<pre><code>#data-one{
  -webkit-animation-name:bar-one;
}</code></pre>
</li>
<li>Assign the element animation properties. Here you set things like duration, repetition and ease-in/out.
<pre><code>#data-one,#data-two,#data-three{
  -webkit-animation-duration:0.5s;
  -webkit-animation-iteration-count:1;
  -webkit-animation-timing-function:ease-out;
}</code></pre>
</li>
<li>Set up the keyframes of the animation. Here you set the various points. Here we have one thing to animate through two states, so we simply set a beginning at 0% and and end at 100%. We could set at any percentage in between but as we just have a beginning and an end, we don&#8217;t need to&mdash;Webkit sees to that.
<pre><code>@-webkit-keyframes bar-one{
  0%{
    width:0%;
  }
  100%{
    width:47%;
  }
}</code></pre>
</li>
</ol>
<p>With regards the Webkit reflections, it may be a better idea to consult the <a href="http://webkit.org/blog/182/css-reflections/" title="Surfin&rsquo; Safari article on Webkit reflections">Surfin&#8217; Safari page on that</a>, as anything I&#8217;d say would most likely be a poorly pulled off rehash.</p>
<h2>Closing word</h2>
<p>So there you have it, a real life, justifiable and wholly appropriate application of CSS3 and progressive enhancement coupled with data visualisation. Don&#8217;t be held back by the limitations of older browsers&mdash;relish in the opportunities new ones bring.</p>
<p>And as a final bonus, <a href="http://twitter.com/VIPickering" title="Vincent Pickering on Twitter">@VIPickering</a> requested <a href="/demos/graphs/index2.php" title="A slightly more extravagant version of the same chart">this (view in Safari/Chrome)</a>&#8230; enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://csswizardry.com/2010/02/css-bar-charts-styling-data-with-css3-and-progressive-enhancement/feed/</wfw:commentRss>
		<slash:comments>4</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>
		<item>
		<title>Suzanna Haworth Photography</title>
		<link>http://csswizardry.com/2009/12/suzanna-haworth-photography/</link>
		<comments>http://csswizardry.com/2009/12/suzanna-haworth-photography/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 19:53:55 +0000</pubDate>
		<dc:creator>Harry Roberts</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Progressive Enhancement]]></category>

		<guid isPermaLink="false">http://csswizardry.com/?p=7</guid>
		<description><![CDATA[I recently completed a complete design and build for my girlfriend, Suzanna Haworth. She&#8217;s something of a photographer and we decided that we ought to knock her a little site up to showcase her works. As she wasn&#8217;t a client per se I had much more creative freedom than I usually would so I decided [...]]]></description>
			<content:encoded><![CDATA[<p><span class="opener"><span>I</span></span> recently completed a complete design and build for my girlfriend, <a title="Suzanna Haworth Photography website" href="http://suzannahaworth.com/">Suzanna Haworth</a>. She&#8217;s something of a photographer and we decided that we ought to knock her a little site up to showcase her works. As she wasn&#8217;t a client per se I had much more creative freedom than I usually would so I decided to exercise some CSS3 and progressive enhancement on the site.</p>
<p><a style="background:none;" title="Suzanna Haworth Photography website" href="http://suzannahaworth.com/"><img class="full" src="http://csswizardry.com/wp-content/uploads/2009/12/suze-site.jpg" alt="Screenshot of Suzanna Haworth’s website" width="640" height="365" /></a></p>
<p><span id="more-7"></span></p>
<p>The site also uses some custom written PHP which makes really light weight of adding new galleries and images, as well as making it pretty efficient for such a heavy website.</p>
]]></content:encoded>
			<wfw:commentRss>http://csswizardry.com/2009/12/suzanna-haworth-photography/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
