<?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>Advanced CSS Design Resources - last-child.com &#187; CSS3</title>
	<atom:link href="http://www.last-child.com/category/css/css3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.last-child.com</link>
	<description>CSS Toys for Professional Web Developers</description>
	<lastBuildDate>Mon, 19 Dec 2011 18:30:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>CSS3 Gradient Backgrounds and Controlling Their Height</title>
		<link>http://www.last-child.com/gradient-backgrounds-height/</link>
		<comments>http://www.last-child.com/gradient-backgrounds-height/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 21:42:28 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[background]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[gradient]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=268</guid>
		<description><![CDATA[Let&#8217;s assume you want to create a gradient background that starts at the top of the page and finishes at the bottom of your page header, i.e. is 100px tall. You can do this with a combination of CSS3 rules and avoid those ugly background images. First off, I&#8217;m going to use the excellent Colorzilla [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s assume you want to create a gradient background that starts at the top of the page and finishes at the bottom of your page header, i.e. is 100px tall. You can do this with a combination of CSS3 rules and avoid those ugly background images.</p>
<p>First off, I&#8217;m going to use the excellent <a href="http://www.colorzilla.com/gradient-editor/">Colorzilla gradient creator</a> to establish the colors.<br />
<code lang="CSS"><br />
div#gradientbg { /*the following rules are from colorzilla*/<br />
background: #e6f0a3; /* old browsers */<br />
background: -moz-linear-gradient(top, #e6f0a3 0%, #d2e638 50%, #c3d825 51%, #FFFFFF 100%); /* firefox */<br />
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e6f0a3), color-stop(50%,#d2e638), color-stop(51%,#c3d825), color-stop(100%,#FFFFFF); /* webkit */<br />
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e6f0a3', endColorstr='#dbf043',GradientType=1 ); /* ie */<br />
}<br />
</code></p>
<p>This works great for applying a background to the entire page. But we want to limit this to just the header. We&#8217;ll need two declarations. First a browser-specific rule (<a href="http://www.css3.info/preview/background-size/">background-size</a>). This, however could cause a series of gradient bands to tile across the screen. so simply add the no-repeat as well.<br />
<code lang="CSS"><br />
-moz-background-size:100% 100px;<br />
...<br />
background:no-repeat;<br />
</code></p>
<h3>Final CSS</h3>
<p><code lang="CSS"><br />
div#gradientbg {<br />
  display:block; width:500px; height:400px; border:1px solid #ccc;<br />
  /*the following rules are from colorzilla*/</p>
<p>  background: #e6f0a3; /* old browsers */</p>
<p>  background: no-repeat -moz-linear-gradient(top, #e6f0a3 0%, #d2e638 50%, #c3d825 51%, #FFFFFF 100%);<br />
  -moz-background-size:100% 100px;/* firefox */</p>
<p>  background:  no-repeat -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e6f0a3), color-stop(50%,#d2e638),<br />
  color-stop(51%,#c3d825), color-stop(100%,#FFFFFF));<br />
  -webkit-background-size:100% 100px;/* webkit */</p>
<p>  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e6f0a3', endColorstr='#FFFFFF',GradientType=0 ); /* ie */<br />
}<br />
</code></p>
<p><a href="http://tests.last-child.com/gradient-test.html">View the example page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/gradient-backgrounds-height/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A quick CSS3 sibling test with the video tag</title>
		<link>http://www.last-child.com/css3-sibling-with-video-tag/</link>
		<comments>http://www.last-child.com/css3-sibling-with-video-tag/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 15:56:31 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[:absolute]]></category>
		<category><![CDATA[:block]]></category>
		<category><![CDATA[:focus]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[position]]></category>
		<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[Siblings]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=240</guid>
		<description><![CDATA[I am working on a little widget that uses the html5 video tag on one of my test sites: Fyvr.net. I wanted to display related information when the video is playing. The sibling selector makes this easy. Here&#8217;s the basic markup &#60;li> &#60;video>...&#60;/video> &#60;p>...&#60;/p> &#60;/li> I wanted the paragraph to appear when the video is [...]]]></description>
			<content:encoded><![CDATA[<p>I am working on a little widget that uses the html5 video tag on one of my test sites: <a href="http://fyvr.net">Fyvr.net</a>.<br />
I wanted to display related information when the video is playing.  The sibling selector makes this easy. </p>
<p>Here&#8217;s the basic markup</p>
<pre><code lang="HTML">
&lt;li>
&lt;video>...&lt;/video>
&lt;p>...&lt;/p>
&lt;/li>
</code>
</pre>
<p>I wanted the paragraph to appear when the video is selected. So here&#8217;s the simple CSS</p>
<pre><code lang="CSS">
section#videolist li {
	position:relative;
}
section#videolist li p {
	display:none;
	position:absolute;
	bottom:-100px;
	left:0;
}
section#videolist li video:focus+p {
	display:block;
}
</code></pre>
<p>The sibling selector (+) is telling the browser to display the paragraph as block when its video brother has focus. This is a rough test. There could be some accessibility issues and I&#8217;ll need to test this out. Obviously this will not work in Internet Explorer. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/css3-sibling-with-video-tag/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dive into HTML5 should be everyone&#8217;s intro to the standard</title>
		<link>http://www.last-child.com/dive-into-html5/</link>
		<comments>http://www.last-child.com/dive-into-html5/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 22:30:50 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Online Resource]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[FAQs Help and Tutorials]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Markup Languages]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=224</guid>
		<description><![CDATA[I just found out about the Dive Into HTML5 tutorial. It&#8217;s downright amazing. I wish all specs were so carefully described. Don&#8217;t miss the first chapter on the history of standards creation. It gives you a good understanding of why the HTML standards are quirky and why HTML5 is progressing the way it is. I [...]]]></description>
			<content:encoded><![CDATA[<p>I just found out about the <a href="http://diveintohtml5.org/">Dive Into HTML5</a> tutorial. It&#8217;s downright amazing. I wish all specs were so carefully described. Don&#8217;t miss the first chapter on the history of standards creation. It gives you a good understanding of why the HTML standards are quirky and why HTML5 is progressing the way it is.</p>
<p>I especially like the way they test your browser for its ability to handle the various components you are reading about. Take an hour or so to go through this tutorial. It&#8217;s the best read you&#8217;ll have for the week.</p>
<p>Another good tutorial is <a href="http://ajaxian.com/archives/the-best-html5-slides-ever">The Best HTML5 Slides Ever</a>, but you&#8217;ll need to view it in Safari. It doesn&#8217;t work well in the standard Firefox and forget about IE. </p>
<h3>Related articles by Zemanta</h3>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.zeldman.com/2010/04/18/link-relations-in-html5/">Link Relations in HTML5</a> (zeldman.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.slideshare.net/NickArmstrong/digital-gunslingers-html5">A Primer on HTML 5 &#8211; By Nick Armstrong</a> (slideshare.net)</li>
<li class="zemanta-article-ul-li"><a href="http://www.last-child.com/html5-helpful-links/">HTML5 Helpful Links</a> (last-child.com)</li>
<li class="zemanta-article-ul-li"><a href="http://ajaxian.com/archives/the-best-html5-slides-ever">The Best HTML5 Slides Ever</a> (ajaxian.com)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/dive-into-html5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HTML5 Helpful Links</title>
		<link>http://www.last-child.com/html5-helpful-links/</link>
		<comments>http://www.last-child.com/html5-helpful-links/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 18:55:45 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Online Resource]]></category>
		<category><![CDATA[Other Links]]></category>
		<category><![CDATA[Standardista]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[online resources]]></category>
		<category><![CDATA[resources]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=216</guid>
		<description><![CDATA[I&#8217;m starting to hack away at HTML5 and I&#8217;m finding that I need to start bookmarking more and more pages. There are lots of good resources out there. Here are a few: HTML5 structure—div, section &#38; article &#8211; Oli.jp HTML5 &#8211; Wikipedia Dive Into HTML5 The Best HTML5 Slides Ever HTML5 Forms Have a Field [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m starting to <a href="http://booksearch.bosshacks.com">hack away at HTML5</a> and I&#8217;m finding that I need to start bookmarking more and more pages. There are lots of good resources out there. Here are a few:</p>
<ul>
<li><a href="http://oli.jp/2009/html5-structure1/">HTML5 structure—div, section &amp; article</a> &#8211; Oli.jp</li>
<li><a href="http://en.wikipedia.org/wiki/HTML5">HTML5</a> &#8211; Wikipedia</li>
<li><a href="http://diveintohtml5.org/">Dive Into HTML5</a></li>
<li><a href="http://ajaxian.com/archives/the-best-html5-slides-ever">The Best HTML5 Slides Ever</a></li>
<li> HTML5 Forms
<ul>
<li><a href="http://24ways.org/2009/have-a-field-day-with-html5-forms">Have a Field Day with HTML5 Forms</a> &#8211; 24 Ways</li>
<li><a href="http://www.w3.org/TR/html5/forms.html">HTML5 Forms Spec</a> &#8211; W3C</li>
<li><a href="http://dev.opera.com/articles/view/improve-your-forms-using-html5/">Improve your forms using HTML5</a> &#8211; Dev Opera</li>
</ul>
</li>
<li><a href="http://html5doctor.com/the-hgroup-element/">The HGroup Element</a> HTML5 Doctor</li>
<li><a href="http://oli.jp/2008/html5-class-cheatsheet/">HTML5 id/class name cheatsheet</a> &#8211; Oli.jp</li>
<li><a href="http://jontangerine.com/log/2008/03/preparing-for-html5-with-semantic-class-names">  Preparing for HTML5 with Semantic Class Names</a> &#8211; John Tan</li>
<li><a href="http://cameronmoll.com/archives/2009/01/12_resources_for_html5/index.html">12 resources for getting a jump on HTML 5</a> &#8211; Authentic Boredom</li>
<li><a href="http://html5doctor.com">HTML5 Doctor</a></li>
<li><a href="http://html5gallery.com/">HTML5 Gallery</a></li>
<li><a href="http://www.brucelawson.co.uk/2010/html5-video-canvas-accessibility-microdata/">HTML5 video, canvas accessibility, microdata </a> &#8211; Bruce Lawson</li>
<li><a href="http://www.brucelawson.co.uk/2009/why-browsers-treat-html5-elements-as-inline/" rel="bookmark" title="Permanent Link to Why browsers treat HTML5 elements as inline">Why browsers treat HTML5 elements as inline</a></li>
<li><a href="http://www.brucelawson.co.uk/2009/html-5-elements-test/">HTML 5 elements test</a> &#8211; Bruce Lawson</li>
<li><a href="http://www.zeldman.com/superfriends/">HTML5 Superfriends</a> &#8211; Zeldman</li>
<li><a href="http://oli.jp/2009/html5-structure3/">HTML5 structure—nav, aside, figure &amp; footer</a></li>
<li><a href="http://delicious.com/search?p=html5">HTML5 on Delicious</a></li>
<li><a href="http://html5doctor.com/html-5-reset-stylesheet/">HTML5 Reset Stylesheet</a> HTML5 Doctor</li>
<li> <a class="zem_slink freebase/en/cascading_style_sheets" href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets" title="Cascading Style Sheets" rel="wikipedia">CSS3</a> Gradients
<ul>
<li><a href="http://www.dynamicdrive.com/style/csslibrary/item/css3_linear_gradients/">CSS3 Linear Gradients</a>- Dynamic Drive</li>
<li><a href="http://www.stevenazari.co.cc/index.php?option=com_content&amp;view=article&amp;id=333:quick-tip-understanding-css3-gradients&amp;catid=34:news-feeds&amp;Itemid=49">Quick Tip: Understanding CSS3 Gradients </a> &#8211; Steven Azari</li>
</ul>
</li>
<li>CSS3 Fonts
<ul>
<li><a href="http://www.w3.org/TR/2002/WD-css3-webfonts-20020802/">CSS3 Web Fonts spec</a> &#8211; W3C</li>
<li><a href="http://www.josbuivenga.demon.nl/delicious.html">Delicious &#8211; a free font to try</a> &#8211; exljbris Font Foundry</li>
<li><a href="http://www.zenelements.com/blog/css3-embed-font-face/">CSS3 Embedding a Font Face</a> &#8211; Zen Elements</li>
<li><a href="http://craigmod.com/journal/font-face/">The Potential of Web Typography</a> &#8211; Craig Mod</li>
<li><a href="http://hacks.mozilla.org/2009/06/beautiful-fonts-with-font-face/">Beautiful Fonts with Font Face</a> &#8211; Mozilla</li>
<li><a href="http://typekit.com/fonts">Typekit</a> &#8211; A font hosting service for web developers</li>
</ul>
</li>
<li><a href="http://blog.new-bamboo.co.uk/2009/12/30/brain-dump-of-real-time-web-rtw-and-websocket">Brain Dump of Real Time Web(RTW) and WebSocket</a> &#8211; Bamboo Blog</li>
<li><a href="http://www.css3.info/">CSS3 Info</a></li>
</ul>
<h3>Related articles by Zemanta</h3>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://blogs.msdn.com/ie/archive/2010/03/05/W3C-HTML-Working-Group-Publishes-New-Drafts.aspx">W3C HTML Working Group Publishes New Drafts</a> (blogs.msdn.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.downes.ca/cgi-bin/page.cgi?post=51553">HTML5, document metadata and Dublin Core</a> (downes.ca)</li>
<li class="zemanta-article-ul-li"><a href="http://www.last-child.com/html5-resource-html5-doctor/">HTML5 Resource: HTML5 Doctor</a> (last-child.com)</li>
<li class="zemanta-article-ul-li"><a href="http://googlewebmastercentral.blogspot.com/2010/03/microdata-support-for-rich-snippets.html">Microdata support for Rich Snippets</a> (googlewebmastercentral.blogspot.com)</li>
<li class="zemanta-article-ul-li"><a href="http://thenextweb.com/2010/04/03/5-html5-sites/">5 Must See HTML5 Sites</a> (thenextweb.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.toddrjordan.com/thebroadbrush/2010/04/flickr-announces-html5-video-playback-on-ipad/">Flickr announces HTML5 video playback on iPad</a> (toddrjordan.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.techstartups.com/2010/04/01/mefeedia-rolls-out-with-html5-video-the-standard-for-new-internet-browsers-and-the-ipad/">Mefeedia rolls out with HTML5 Video, the standard for new Internet browsers and the iPad</a> (techstartups.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.tuaw.com/2010/04/03/gmail-html5-optimized-for-the-ipad/">Gmail HTML5-optimized for the iPad</a> (tuaw.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.ubergizmo.com/15/archives/2010/03/brightcove_supports_html5_video_officially.html">Brightcove supports HTML5 video officially</a> (ubergizmo.com)</li>
<li class="zemanta-article-ul-li"><a href="http://ajaxian.com/archives/html5-forms-what-support-is-there">HTML5 Forms. What support is there?</a> (ajaxian.com)</li>
<li class="zemanta-article-ul-li"><a href="http://radar.oreilly.com/2010/03/why-html5-is-worth-your-time.html">Why HTML5 is worth your time</a> (radar.oreilly.com)</li>
<li class="zemanta-article-ul-li"><a href="http://ajaxian.com/archives/html5-forms-what-support-is-there">HTML5 Forms. What support is there?</a> (ajaxian.com)</li>
<li class="zemanta-article-ul-li"><a href="http://radar.oreilly.com/2010/03/why-html5-is-worth-your-time.html">Why HTML5 is worth your time</a> (radar.oreilly.com)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/html5-helpful-links/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HTML5 &#8211; quick notes from The Chronicles of Web Standard III &#8211; The Voyage of the HTML5</title>
		<link>http://www.last-child.com/html5-quick-notes/</link>
		<comments>http://www.last-child.com/html5-quick-notes/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 16:43:27 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Scalable Vector Graphics]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=207</guid>
		<description><![CDATA[I went to the The Chronicles of Web Standard III &#8211; The Voyage of the HTML5 presentation by Silicon Valley Web Builder last night. Here are some quick notes I took before my battery died. Please note: I am far from an expert on HTML5 and welcome any comments and/or corrections to the following notes. [...]]]></description>
			<content:encoded><![CDATA[<p>I went to the <a href="http://voyageofhtml5.eventbrite.com/">The Chronicles of Web Standard III &#8211; The Voyage of the HTML5</a> presentation by <a href="http://www.eventbrite.com/org/21109741?s=1647134">Silicon Valley Web Builder</a> last night. Here are some quick notes I took before my battery died.<br />
<img src="http://www.last-child.com/wp-content/uploads/2010/04/html5-fist.jpg" alt="HTML5" title="HTML5" class="size-full wp-image-209" width="240" height="251"><br />
<strong>Please note:</strong> I am far from an expert on HTML5 and welcome any comments and/or corrections to the following notes.</p>
<p>The speakers were</p>
<ul>
<li>Ben Galbraith, Co-founder at Ajaxian.com</li>
<li>Brad Neuberg, Developer at <a class="zem_slink freebase/en/google" href="http://google.com" title="Google" rel="homepage">Google</a></li>
<li>Chet Haase, <a class="zem_slink freebase/en/adobe_creative_team" href="http://www.adobe.com/" title="Adobe Systems" rel="homepage">Adobe</a> Flex SDK team member</li>
<li>Michael Carter, Founder at Orbited Project &amp; Official Contributor for W3C HTML5</li>
</ul>
<p>First off, HTML5 was defined as not just an <a class="zem_slink freebase/en/html" href="http://en.wikipedia.org/wiki/HTML" title="HTML" rel="wikipedia">HTML4</a>+ spec. It also includes all of the advances since HTML4.0. These include:</p>
<ul>
<li>CSS3</li>
<li>webGL</li>
<li>geolocation</li>
<li>web workers</li>
<li>web storage</li>
<li>web sockets</li>
<li>canvas, <a class="zem_slink freebase/en/scalable_vector_graphics" href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics" title="Scalable Vector Graphics" rel="wikipedia">SVG</a></li>
</ul>
<h3>Canvas vs. SVG</h3>
<p>You can roughly think of these as Adobe <a class="zem_slink freebase/en/adobe_flash" href="http://www.adobe.com/products/flash/flashpro/" title="Adobe Flash" rel="homepage">Flash</a> replacements.</p>
<p>Both canvas and SVG can be used to build dynamic images, charts, animation, and more. Canvas has more adoption at this point and is faster. However, the canvas is built and then keeps no memory of the objects it contains. SVG is more structured and knows what it contains. These sub objects can be further manipulated. SVG has the potential of being much more powerful than canvas in the long run. <a class="zem_slink freebase/en/microsoft_corporation" href="http://www.microsoft.com" title="Microsoft" rel="homepage">Microsoft</a>&#8216;s IE9 has demonstrated great potential with SVG.</p>
<h3>CSS3 Advancements</h3>
<p>There&#8217;s been an extended argument about where CSS or JS should be used on a web site. Some developers argue CSS shouldn&#8217;t be used for interactivity, such as drop down menus. However, the <a href="http://webkit.org/blog/130/css-transforms/">CSS transformations</a> available in CSS3 are going to throw a major monkey wrench into this argument. They are blurring the boundaries and can do a much better job than javaScript.</p>
<p><a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26search-alias%3Dcomputers%26ref_%3Dbl%5Fsr%5Felectronics%26field-brandtextbin%3DApple&amp;tag=csstoyslastch-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=390957">Apple</a><img src="https://www.assoc-amazon.com/e/ir?t=csstoyslastch-20&amp;l=ur2&amp;o=1" alt="" style="border: medium none ! important; margin: 0px ! important;" border="0" width="1" height="1"> and Safari have pushed the development of transformations as they introduced the animation of pages when you switch an <a class="zem_slink" href="http://www.apple.com/iphone" title="iPhone 3G" rel="homepage">iPhone</a> from portrait to landscape mode. This is just the tip of the iceberg. An example last night showed a CSS only version of itunes&#8217; coverflow animation. Check out the <a href="http://www.w3.org/TR/css3-3d-transforms/">CSS3 3D transformations</a>.</p>
<h3>Web Workers</h3>
<p><a href="http://www.whatwg.org/specs/web-workers/current-work/">Web workers</a> technology should solve an existing problem with javaScript functions that run for extended periods. One example was a JS transformation of an image. It rotated the image and added reflections. However, the image would stop rotating when a user clicked on a button to add/change the functionality. Web Workers allows these functions to operate consistently. </p>
<p>There was another example with a movie of a guy holding a piece of cardboard and rotating it randomly. The user could click on various movies and watch them appear on the cardboard in the movie. </p>
<h3>You can participate</h3>
<p>One thing mentioned often in the meeting was the open structure for developing the specifications. Anyone can participate by joining the mailing lists, irc (irc.freenode  whatwg), and making requests, suggestions, and comments. </p>
<p>They are especially interested in knowing what problems you have that are not solved by the existing specs. What changes would particularly affect you and how would you solve the problem. </p>
<p>For instance, I asked if the phone manufacturers are looking at the HTML5 web forms and using the new input types to intelligently autofill forms. For instance, they know an input is asking for a phone number, should a phone insert your number automatically? What about your other contact information? </p>
<p>Currently, this interaction is not in the spec. This is the kind of comment/suggestion they need to make the final specifications. </p>
<h3>Related articles by Zemanta</h3>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://r.zemanta.com/?u=http%3A//www.infoworld.com/d/applications/opinion-html5-less-its-cracked-be-381%3Fsource%3Drss_infoworld_news&amp;a=15797299&amp;rid=b424896d-f840-467a-8670-7f429e595c57&amp;e=2ebf05b41f71f5fff489c1062c7811d4">Opinion: HTML5 is less than it&#8217;s cracked up to be</a> (infoworld.com)</li>
<li class="zemanta-article-ul-li"><a href="http://asserttrue.blogspot.com/2010/03/microsoft-gets-behind-svg-finally.html">Microsoft gets behind SVG &#8212; finally</a> (asserttrue.blogspot.com)</li>
<li class="zemanta-article-ul-li"><a href="http://blogs.msdn.com/ie/archive/2010/03/18/svg-in-ie9-roadmap.aspx">SVG in IE9 Roadmap</a> (blogs.msdn.com)</li>
<li class="zemanta-article-ul-li"><a href="http://r.zemanta.com/?u=http%3A//www.infoworld.com/t/browsers/google-and-adobe-cozy-flash-chrome-browser-602%3Fsource%3Drss_infoworld_news&amp;a=15704095&amp;rid=b424896d-f840-467a-8670-7f429e595c57&amp;e=1c50eb517f1c4d00b7501cf60d17a739">Google and Adobe cozy up on Flash for Chrome browser</a> (infoworld.com)</li>
<li class="zemanta-article-ul-li"><a href="http://r.zemanta.com/?u=http%3A//www.infoworld.com/d/applications/microsoft-embraces-html5-specification-in-ie9-861%3Fsource%3Drss_infoworld_news&amp;a=14887145&amp;rid=b424896d-f840-467a-8670-7f429e595c57&amp;e=a730029cfc48b4b2b0c171c3c1eae079">Microsoft embraces HTML5 specification in IE9</a> (infoworld.com)</li>
<li class="zemanta-article-ul-li"><a href="http://24ways.org/2009/html5-tool-of-satan-or-yule-of-santa">HTML5: Tool of Satan, or Yule of Santa?</a> (24ways.org)</li>
<li class="zemanta-article-ul-li"><a href="http://news.cnet.com/8301-30685_3-20000432-264.html?part=rss&amp;subj=news&amp;tag=2547-1_3-0-20">Going beyond Flash, Adobe shows off Web tech</a> (news.cnet.com)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/html5-quick-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Resource: HTML5 Doctor</title>
		<link>http://www.last-child.com/html5-resource-html5-doctor/</link>
		<comments>http://www.last-child.com/html5-resource-html5-doctor/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 17:54:25 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=204</guid>
		<description><![CDATA[I used to think HTML5 was just a pipe dream; something that was a nice idea but had no legs. However, the recent advancement of smart phones makes this the perfect approach for building web-based phone apps. Hence, my interest now in joining the HTML5 game. There&#8217;s a great resource for those like me starting [...]]]></description>
			<content:encoded><![CDATA[<p>I used to think <a class="zem_slink" href="http://en.wikipedia.org/wiki/HTML5" title="HTML5" rel="wikipedia">HTML5</a> was just a pipe dream; something that was a nice idea but had no legs. However, the recent advancement of smart phones makes this the perfect approach for building web-based phone apps. Hence, my interest now in joining the HTML5 game.</p>
<p>There&#8217;s a great resource for those like me starting to dip their toes into the HTML5 pool: <a href="http://html5doctor.com/">HTML5 Doctor</a>. This web site is a collaboration between some of the biggest and brightest stars of web development:  <a href="http://richclarkdesign.com">Rich Clark</a>, <a href="http://www.brucelawson.co.uk">Bruce Lawson</a>, <a href="http://jackosborne.co.uk">Jack Osborne</a>, <a href="http://www.akamike.net">Mike Robinson</a>, <a href="http://remysharp.com">Remy Sharp</a>, <a href="http://www.tomleadbetter.co.uk">Tom Leadbetter</a>, and <a href="http://oli.jp">Oli Studholme</a>.</p>
<p>The article <a href="http://html5doctor.com/how-to-use-html5-in-your-client-work-right-now/">How to use HTML5 in your client work right now</a> has some interesting suggestions on adding HTML5 functionality to your existing projects. This works hand in hand with using advanced CSS3 rules. Don&#8217;t break IE6, but start letting the advanced browsers and platforms give your users more functionality.</p>
<p>Here&#8217;s a summary of HTML5 bits that you can begin using today.</p>
<blockquote>
<ul>
<li>Use the <abbr>HTML</abbr>5 doctype and character set.</li>
<li>Use the simplified <code lang="HTML">&lt;script&gt;</code> and <code lang="HTML">&lt;style&gt;</code> elements.</li>
<li>Use semantic class names that are representative of the new <abbr>HTML</abbr>5 elements. See <a href="http://twitter.com/boblet">@boblet</a>’s <a href="http://boblet.tumblr.com/post/60552152/html5">cheat sheet</a> for more on this.</li>
<li>Use block level links.</li>
<li>Use the new form attributes and input types.</li>
<li>Use the new <code lang="HTML">&lt;audio&gt;</code> and <code lang="HTML">&lt;video&gt;</code> media elements (but make sure they degrade gracefully).</li>
<li>Plug the gaps with something like <a href="http://www.modernizr.com/">Modernizr</a>.</li>
</ul>
<p><cite><a href="http://html5doctor.com/how-to-use-html5-in-your-client-work-right-now/">How to use HTML5 in your client work right now</a> &#8211; Richard Clark</cite>
</p></blockquote>
<h3>Related articles by Zemanta</h3>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://adactio.com/journal/1652/">Next month in HTML5</a> (adactio.com)</li>
<li class="zemanta-article-ul-li"><a href="http://radar.oreilly.com/2010/03/why-html5-is-worth-your-time.html">Why HTML5 is worth your time</a> (radar.oreilly.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.beet.tv/2010/03/brightcove-brining-html5-to-the-new-york-times-time-inc-and-others-for-ipad.html">Brightcove Bringing HTML5 to The New York Times, Time Inc. and others for iPad</a> (beet.tv)</li>
<li class="zemanta-article-ul-li"><a href="http://www.techmeme.com/100329/p4">The Present and Future of HTML5 Video Experiences (Jeff Whatcott/Brightcove Blog)</a> (techmeme.com)</li>
<li class="zemanta-article-ul-li"><a href="http://blogs.adobe.com/designandweb/2010/03/multiscreen_authoring_with_css3.html">Multiscreen authoring with CSS3</a> (blogs.adobe.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.ubergizmo.com/15/archives/2010/03/brightcove_supports_html5_video_officially.html">Brightcove supports HTML5 video officially</a> (ubergizmo.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.ubergizmo.com/15/archives/2010/03/cbs_preparing_html5_video_playback_for_ipad.html">CBS Preparing HTML5 Video Playback For iPad</a> (ubergizmo.com)</li>
<li class="zemanta-article-ul-li"><a href="http://r.zemanta.com/?u=http%3A//www.infoworld.com/d/developer-world/brightcove-backs-html5-ipad-394%3Fsource%3Drss_infoworld_news&amp;a=15639197&amp;rid=aaa81f87-c7cb-4847-b0ef-c39122bc1c0d&amp;e=f23863d6f6c459a84c6b60c12b16ffcc">Brightcove backs HTML5 for iPad</a> (infoworld.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.hubdub.com/m68369/When_will_Internet_Explorer_9_be_Officially_Released">When will Internet Explorer 9 be Officially Released?</a> (hubdub.com)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/html5-resource-html5-doctor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 Attribute Selector Presentation</title>
		<link>http://www.last-child.com/css3-attribute-selectors/</link>
		<comments>http://www.last-child.com/css3-attribute-selectors/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 20:46:11 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[attribute selector]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Presentation]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=162</guid>
		<description><![CDATA[During the fog of a summer cold and pressing deadlines&#8230; I gave a presentation today at the Yahoo! Front End Engineering Summit about CSS3 Attribute Selectors. The presentation briefly touched on some of my previous posts on this site as well as a few new concepts and ideas. Here is the full presentation (HTML): CSS3 [...]]]></description>
			<content:encoded><![CDATA[<p>During the fog of a summer cold and pressing deadlines&#8230; I gave a presentation today at the <a href="http://www.flickr.com/photos/tags/f2esummit08/">Yahoo! Front End Engineering Summit</a> about CSS3 Attribute Selectors. The presentation briefly touched on some of my previous posts on this site as well as a few new concepts and ideas.</p>
<p>Here is the full presentation (HTML): <a href="http://www.last-child.com/presentations/attributes/">CSS3 Attribute Lovin&#8217;</a>. Feel free to copy, share, or do whatever you like with it.  </p>
<p>I&#8217;ll post some more information on the new topics soon. Right now I&#8217;ve got to get back to my massive list of outstanding bugs on my project.<br />
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.list-your-blog.com/yahoo-launches-web-analytics/">Yahoo Launches Web Analytics</a></li>
<li class="zemanta-article-ul-li"><a href="http://blog.searchenginewatch.com/blog/081009-082420">Yahoo Rebrands IndexTools as Web Analytics; Launches Limited Release</a></li>
<li class="zemanta-article-ul-li"><a href="http://ajaxian.com/archives/yahoo-releases-new-performance-best-practices">Yahoo! releases new performance best practices</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/css3-attribute-selectors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding style to your rel attributes with CSS</title>
		<link>http://www.last-child.com/rel-attribute-display/</link>
		<comments>http://www.last-child.com/rel-attribute-display/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 15:03:00 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[attribute selector]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS2]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Image Sprites]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[microformats]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[Data Formats]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[rel]]></category>
		<category><![CDATA[xfn]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=153</guid>
		<description><![CDATA[View the finished example: Adding style to your rel link. There&#8217;s a little attribute in HTML links that is starting to get a bit of attention lately. The &#8220;rel&#8221; attribute is a sparsely defined attribute that applies some meta information about a link&#8217;s relationship to other documents. Unfortunately, this information is usually hidden from your [...]]]></description>
			<content:encoded><![CDATA[<p>View the finished example: <a href="/examples/rel-attribute/index.html">Adding style to your rel link</a>.</p>
<p>There&#8217;s a little attribute in HTML links that is starting to get a bit of attention lately. The &#8220;rel&#8221; attribute is a <a href="http://www.w3.org/TR/REC-html40/types.html#type-links">sparsely defined attribute</a> that applies some meta information about a link&#8217;s relationship to other documents. Unfortunately, this information is usually hidden from your users. Let&#8217;s take a light-hearted stab at turning it into a visual element.</p>
<h3>Rel attribute usage</h3>
<p>
While the W3C originally considered the rel attribute to describe the relationship of pages to each other, i.e. next, previous, directory, and start. The attribute has been adopted by the <a href="http://microformats.org">Microformat</a> community for its inherit usefulness. The rel attribute is now used for <a href="http://microformats.org/wiki/rel-tag">tags</a>, <a href="http://gmpg.org/xfn/">to define your relationship to someone</a>, and even to <a href="http://microformats.org/wiki/rel-nofollow">tell search engines not to bother following a link</a>. </p>
<p>
The opportunities to use the rel attribute are seemingly endless. There are more proposals to <a href="http://xen.adactio.com/">define people you don&#8217;t like</a> and <a href="http://microformats.org/wiki/vote-links">links for voting</a>.  </p>
<p>
But all of this flexibility comes at a small price. To remain valid, you need to tell the browser what these new rel values may actually mean. This is handled by <a href="http://microformats.org/wiki/profile-uris">linking to appropriate profiles</a>. Just simply insert the profiles into your head tag. <a href="http://microformats.org/wiki/profile-uris#Combined_Profile">Multiple profiles</a> may throw a validation error, but it&#8217;s ok.  You don&#8217;t need to do this for the standard rel values.</p>
<p><code lang="HTML"><br />
<head profile="http://www.ietf.org/rfc/rfc2731.txt http://www.w3.org/2006/03/hcard"><br />
</code></p>
<p>
We will be using the CSS3 attribute selector functionality to look at the value of the rel attribute and apply some style accordingly. First we&#8217;ll add some padding and a background image to any link that has a rel attribute. We&#8217;ll then use background positioning to display an icon that is appropriate for the link. It&#8217;s a fairly simple hack. </p>
<p>For more information on using attribute selectors, check out my previous posts: </p>
<ul>
<li><a href="/css-attribute-selector/">Progressive enhancement of links using the CSS attribute selector</a></li>
<li><a href="/attribute-selectors-to-provide-language-information/">Attribute selectors to provide language information</a></li>
</ul>
<h3>Sample HTML Code</h3>
<p><code lang="HTML"></p>
<li><a href="http://microformats.org/wiki/rel-nofollow" rel="no-follow">This link is ignored by search engines</a> (rel="no-follow")</li>
<li><a href="http://microformats.org/wiki/rel-tag" rel="tag">A sample tag </a> (rel="tag")</li>
<p></code></p>
<h3>Sample CSS </h3>
<p><code lang="CSS"><br />
a[rel] {padding-left:20px; background:url(rel-sprite.png) no-repeat 0 0; }<br />
a[rel~="help"] {background-position: 0 -350px ;}<br />
a[rel~="license"] {background-position: 0 -1347px ;}<br />
a[rel~="no-follow"] {background-position: 0 -1200px ;}<br />
a[rel~="tag"] {background-position: 0 -47px ;}<br />
</code></p>
<h3>It&#8217;s all fun and games</h3>
<p>
I&#8217;ll be the first to admit this exercise has significant issues. I&#8217;m assuming the following elements are true:</p>
<ol>
<li>All possible rel attribute values are accounted for in my CSS, if not there will be a blank space generated by the first rule</li>
<li>You can only have one relationship defined by XFN. Unfortunately, most people are defined by multiple values, i.e. rel=&#8221;met friend colleague&#8221;. This CSS does not account for multiple values. </li>
</ol>
<p>So, the display of your rel attributes may be a bit off in the edge cases. Keep the spirit light and nobody will say anything&#8230; I hope. Have fun with your rel attributes. They&#8217;re just sitting there waiting to be used. </p>
<p><a href="/examples/rel-attribute/index.html">View the finished rel attribute style example</a>.</p>
<h3>Related Information</h3>
<ul>
<li>Microformats Wiki: <a href="http://microformats.org/wiki/profile-uris#Combined_Profile">Profile URI&#8217;s</a></li>
<li>Microformat: <a href="http://microformats.org/wiki/rel-design-pattern">Rel Design Pattern</a></li>
<li>Microformat: <a href="http://microformats.org/wiki/rel-tag">Tags</a></li>
<li>Microformat: <a href="http://microformats.org/wiki/rel-no-follow">No Follow</a></li>
<li>Microformat: <a href="http://microformats.org/wiki/rel-bookmark">Bookmark</a></li>
<li>Microformat: <a href="http://gmpg.org/xfn/">XFN &#8211; Friends Network</a></li>
<li>Microformat: <a href="http://xen.adactio.com/">XEN &#8211; Enemies Network</a></li>
<li>W3C: <a href="http://www.w3.org/TR/REC-html40/types.html#type-links">Link Types</a></li>
<li><a href="http://www.iconbuffet.com/">Icon Buffet</a> &#8211; The source of most icons used in this example</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/rel-attribute-display/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Progressive enhancement of links using the CSS attribute selector</title>
		<link>http://www.last-child.com/css-attribute-selector/</link>
		<comments>http://www.last-child.com/css-attribute-selector/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 20:13:00 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[:after]]></category>
		<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[attribute selector]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS2]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[DHTML]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[Image Sprites]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[min-height]]></category>
		<category><![CDATA[Online Resource]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[selector]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=152</guid>
		<description><![CDATA[Attribute Selector Test Page We have avoided using CSS3 rules for too long. It&#8217;s been difficult to justify using rules that won&#8217;t work for a significant portion of our audience, Internet Explorer 7 and below. However, Internet Explorer 8 is coming out soon and does work with the features we like. I think it&#8217;s fairly [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/examples/attrib-files/index.html">Attribute Selector Test Page </a></p>
<p>
We have avoided using CSS3 rules for too long. It&#8217;s been difficult to justify using rules that won&#8217;t work for a significant portion of our audience, Internet Explorer 7 and below.  However, Internet Explorer 8 is coming out soon and does work with the features we like. </p>
<p>
 I think it&#8217;s fairly safe to assume IE7 users will upgrade to IE8 within a short time. Those stuck with IE6 for one reason or another will slowly disappear as they are given new computers or their locked down environments are upgraded.</p>
<p>
So, with the future of CSS3 functionality within reach, I&#8217;ve been energized to begin experimenting again.  I&#8217;ll be writing a series of blog posts over the next few months that look at CSS3 functionality as a progressive enhancement. How can we continue to deliver a perfectly fine web site to IE6 and IE7 and mobile phones while enhancing the functionality of more modern browsers and devices?</p>
<h3>Attribute Selectors</h3>
<p>
CSS attribute selectors are the golden ring on the web development merry-go-round. They can be daunting to learn, addictive to use, but then disappointing when you realize they are out of your grasp when you test in Internet Explorer.  We can, however, begin using them to add additional functionality based on your pre-existing, semantic code. Attribute selectors give you power to write CSS that pinpoints the stuff you already code, without having to go back and add classes or ids. I&#8217;ve written previously about <a href="/attribute-selectors-to-provide-language-information/">using attribute selectors to let your users know the language of a site they are about to visit</a>. This trick relies on the rarely used hreflang attribute, which identifies the language of the site targeted in a link.</p>
<p>
There are many other attributes in your HTML, from <a href="http://www.w3.org/TR/html4/struct/tables.html#h-11.4.1">table headers</a>, <a href="http://www.w3.org/TR/REC-html40/struct/objects.html#adef-src-IMG">image src</a>,  <a href="http://www.w3.org/TR/html401/struct/links.html#h-12.1.4">link titles</a>, and <a href="http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.6.1">selected options</a>. Think about all of those juicy attributes just waiting to be targeted. Also think about how you could actually do something useful with them.</p>
<h3>Announce the file type of a link with CSS</h3>
<p>
I once worked for a company that had hundreds of thousands of static HTML pages in their intranet. With no content management system; it was impossible to make global changes. The only thing they shared was a common set of style sheets. Does this sound familiar?  Follow along as we increase your site&#8217;s usability in a less than perfect, but efficient way. </p>
<p>
First off, for accessibility, you need to let users know when a link  will open a file, what type it is, and how large it is. This is best done by adding it to your HTML code:</p>
<p><code lang="HTML"><br />
<a href="foo.pdf" class="pdf">Foo presentation (.pdf, 5kb)</a><br />
</code></p>
<p>That delivers the information to everyone, regardless of their browser.  This, however takes time and is a daunting task for updating legacy code. </p>
<p>
We can, however, use the <a href="http://www.w3.org/TR/2001/CR-css3-selectors-20011113/#attribute-selectors">atttribute selector</a> to target the extension of the link to display the icon and insert the text describing the file type. Here&#8217;s the sample HTML code:</p>
<p><code lang="HTML"></p>
<ul>
<li><a href="foo.zip" >sample zip link</a></li>
<li><a href="foo.pdf" >sample pdf link</a></li>
<li><a href="foo.doc" >sample Word link</a></li>
<li><a href="foo.exe" >sample Executable link</a></li>
<li><a href="foo.png" >sample png image</a></li>
<li><a href="foo.mp3" >sample MP3 file </a></li>
</ul>
<p></code><br />
It&#8217;s a simple list of links for different types of files. We&#8217;ll be looking at the extensions: .zip, .pdf, .doc, .exe, .png, and .mp3. Feel free to extend this list to any extension you so desire. This would be especially helpful for a company that uses proprietary file types within their intranet.</p>
<p>
Now, let&#8217;s look at the CSS:</p>
<p><code lang="CSS"><br />
a[href$="zip"],<br />
a[href$="pdf"],<br />
a[href$="doc"],<br />
a[href$="exe"],<br />
a[href$="png"],<br />
a[href$="mp3"]  {padding-left:20px; background:url(bg-file-icons.png) no-repeat 0 0;}<br />
a[href$="png"]{background-position: 0 -48px;}<br />
a[href$="pdf"] {background-position: 0 -99px;}<br />
a[href$="mp3"]{background-position: 0 -145px;}<br />
a[href$="doc"]{background-position: 0 -199px;}<br />
a[href$="exe"]{background-position: 0 -250px;}</p>
<p>a[href$=".zip"]:after{content: "(.zip file)"; color:#999; margin-left:5px;}<br />
a[href$=".pdf"]:after{content: "(.pdf file)"; color:#999; margin-left:5px;}<br />
a[href$=".doc"]:after{content: "(.doc file)"; color:#999; margin-left:5px;}<br />
a[href$=".exe"]:after{content: "(.exe file)"; color:#999; margin-left:5px;}<br />
a[href$=".mp3"]:after{content: "(.mp3 file)"; color:#999; margin-left:5px;}<br />
a[href$=".png"]:after{content: "(.png file)"; color:#999; margin-left:5px;}<br />
a[href$=".exe"]:after{content: "(.exe file)"; color:#999; margin-left:5px;}<br />
</code></p>
<p><a href="/examples/attrib-files/index.html">See the final test page.</a></p>
<h4>Pattern matching in the attribute selector</h4>
<p>We have some limited &#8220;regular expression&#8221; functionality in CSS3. We can search for an attribute&#8217;s presence and match a pattern within the attribute&#8217;s value.<br />
<a href="http://www.hunlock.com/">Patrick Hunlon</a> has a good summary of the pattern matching: </p>
<blockquote cite="http://www.hunlock.com/blogs/Attach_icons_to_anything_with_CSS">
<ul>
<li>[foo]        &#8212; Has an attribute named &#8220;foo&#8221;</li>
<li>[foo="bar"]  &#8212; Has an attribute named &#8220;foo&#8221; with a value of &#8220;bar&#8221; (&#8220;bar&#8221;)</li>
<li>[foo~="bar"] &#8212; Value has the word &#8220;bar&#8221; in it somewhere (&#8220;blue bar stools&#8221;)</li>
<li>[foo^="bar"] &#8212; Value begins with &#8220;bar&#8221; (&#8220;barstool&#8221;)</li>
<li>[foo$="bar"] &#8212; Value ends with &#8220;bar&#8221; (&#8220;I was at the bar&#8221;)</li>
<li>[foo*="bar"] &#8212; Value has bar somewhere (&#8220;I was looking for barstools&#8221;)  </li>
</ul>
<p><cite><a href="http://www.hunlock.com/blogs/Attach_icons_to_anything_with_CSS">Attach icons to anything with CSS</a></cite>
</p></blockquote>
<p>
The CSS is simply looking to see if the desired extension is at the end of the link href. If so, apply the following styles. </p>
<h4>Adding an icon to the link</h4>
<p>First, we are match any of the desired file extensions.  We then add a background image and some padding on the left side with a bulk rule. Then  the background position on the sprite is adjust for each particular link type. Combining multiple icons into one background image reduces the number of files the user has to download, <a href="http://developer.yahoo.com/performance/rules.html#opt_sprites">making your page faster</a>. This will work with any browser that recognizes attribute selectors, including Internet Explorer 7. However, support for more obscure attributes may be spotty.</p>
<p>
There&#8217;s another peculiarity with pattern matching. Some attributes are case sensitive while others are not. The href attribute is NOT case sensitive, so the above rules will also work if your image name was <em>FOO.ZIP</em>, <em>foo.Zip</em>, or <em>foo.zip</em>.</p>
<h4>Adding the descriptive text</h4>
<p>Now, we are going to add a bit of descriptive text to each link. We can&#8217;t describe the file size, but we can tell the user what type of file it is. This is using the :after(content:) functionality and is supported by Internet Explorer 8 (yeah!!!) but not Internet Explorer 7 and below (boo!!!).<br />
We will also adjust the color and give it a bit of spacing.</p>
<h3>A big step forward with a small chunk of work</h3>
<p>
There you have it. A small chunk of CSS coding has now added substantial usability to your legacy pages. While the CSS version is not as accessible as having the data in the actual link code, it&#8217;s a significant improvement over nothing at all. Further, there&#8217;s no harmful effect on browsers that do not understand the function. You&#8217;ve added information, but haven&#8217;t taken anything away. This is a win in my book. To save some time and effort, you could just download and use this  package of <a href="http://pooliestudios.com/projects/iconize/">CSS and icons</a> from <a href="http://pooliestudios.com">Alexander Kaiser</a>.</p>
<p>
This rather simple example of attribute selectors and pattern matching can open your eyes to many possibilities. There are a number of developers that have been expoloring this potential for the past few years. Take a look at some of these resources for more ideas and have some fun.</p>
<ul>
<li><a href="http://www.w3.org/TR/2001/CR-css3-selectors-20011113/#attribute-selectors">CSS3 &#8211; Atribute Selectors Definition </a> W3C</li>
<li><a href="http://www.456bereastreet.com/archive/200601/css_3_selectors_explained/">CSS 3 Selectors Explained</a></li>
<li><a href="http://www.stuffandnonsense.co.uk/archives/css_a_tribute_to_selectors.html">CSS: A Tribute to Selectors</a></li>
<li><a href="http://developer.yahoo.com/yui/selector/">YUI: Selector Utility</a> Use CSS3 selectors in JavaScript</li>
<li><a href="http://www.cssdrive.com/index.php/forums/viewthread/45/">Dynamic File Type Notations </a></li>
<li><a href="http://www.andybudd.com/archives/2003/09/cool_use_for_css_attribute_selectors/">Cool use for CSS attribute selectors </a> &#8211; Hiding banner ads with CSS</li>
<li><a href="http://www.askthecssguy.com/2006/12/showing_hyperlink_cues_with_cs_1.html">Showing Hyperlink Cues with CSS </a></li>
<li><a href="http://www.askthecssguy.com/2006/12/showing_hyperlink_cues_with_cs_1.html">Showing Hyperlink Cues with CSS </a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/css-attribute-selector/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>IE7 and IE8 hack behavior</title>
		<link>http://www.last-child.com/ie7-and-ie8-hack-behavior/</link>
		<comments>http://www.last-child.com/ie7-and-ie8-hack-behavior/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 22:59:53 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[IE8]]></category>

		<guid isPermaLink="false">http://www.last-child.com/ie7-and-ie8-hack-behavior/</guid>
		<description><![CDATA[We&#8217;ve had the luxury of hacks to fine tune Internet Explorer bugs. Internet Explorer 7 disabled the majority of hacks, with the exception of the * hack. This hack allowed you to send a style only to Internet Explorer by prefacing an attribute with an asterisk. /*this is for all browsers*/ #main p {color:black;} /* [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve had the luxury of hacks to fine tune Internet Explorer bugs. Internet Explorer 7 disabled the majority of hacks, with the exception of the * hack. This hack allowed you to send a style only to Internet Explorer by prefacing an attribute with an asterisk.</p>
<p><code lang="CSS"><br />
/*this is for all browsers*/<br />
#main p {color:black;}<br />
/* this is for Internet Explorer */<br />
#main *p {color:red;}<br />
/*this is ignored by IE7 and will target IE6 */<br />
#main _p {color:green;}<br />
</code></p>
<p>This set of hacks allowed us to control IE7 and IE6. However, IE8 does not recognize the * hack. Special IE8 rules will either need to be defined with conditional comments, the Microsoft proposed meta tag, or some new hack to be discovered. Let&#8217;s hope the mature version of IE8 will reduce the need for these hacks. </p>
<p>For more information on the above hacks, visit an earlier post: <a href="http://www.last-child.com/ie7-hacks/">IE7 Hacks</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/ie7-and-ie8-hack-behavior/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

