<?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; W3C</title>
	<atom:link href="http://www.last-child.com/category/w3c/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>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 &#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>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>Sample XHTML2 code</title>
		<link>http://www.last-child.com/sample-xhtml2-code/</link>
		<comments>http://www.last-child.com/sample-xhtml2-code/#comments</comments>
		<pubDate>Fri, 16 Mar 2007 16:17:43 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.last-child.com/sample-xhtml2-code/</guid>
		<description><![CDATA[XHTML2 has been discussed for several years. It&#8217;s a logical evolution of HTML and XHTML. It introduces new tags that offer more flexibility and semantic value. So, what does it look like? Explorin Lauren has put together a sample page and it looks pretty simple. XHTML2 introduces a new list item, the NL or Navigation [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.w3.org/TR/xhtml2/">XHTML2</a> has been discussed for several years. It&#8217;s a logical evolution of HTML and XHTML. It introduces new tags that offer more flexibility and semantic value. So, what does it look like? <a href="http://www.explorinlauren.com/">Explorin Lauren</a> has put together a <a href="http://www.explorinlauren.com/xhtml20/">sample page</a> and it looks pretty simple. </p>
<p>XHTML2 introduces a new list item, the <a href="http://www.w3.org/TR/xhtml2/mod-list.html#edef_list_nl">NL or Navigation List</a>. Think of this as a cross between a DL and a UL. It is built similar to the UL but has a label tag.</p>
<p>You&#8217;ll also notice the image tag has been replaced with the more agnostic <a href="http://www.w3.org/TR/xhtml2/mod-object.html#s_objectmodule">object</a> tag. </p>
<p>Will you actually <a href="http://w3future.com/weblog/gems/xhtml2.xml">begin using XHTML2</a>? Unfortunately, <a href="http://www-128.ibm.com/developerworks/library/wa-xhtml/">it&#8217;s not backwards compatible</a> and browsers need a lot of evolving before they are ready for the new code.  <a href="http://xhtml.com/en/future/x-html-5-versus-xhtml-2/">HTML5</a> is more likely the next evolution of HTML. </p>
<p>After working with XML for the past couple years, I would enjoy the structure of XHTML2. However, I also hate to think of the logistics of converting existing <abbr title="Content Management System">CMS</abbr> sites and legacy sites to the new code. Not to mention the branching of CSS and/or JS for the new DOM elements.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/sample-xhtml2-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>@media 2006  first impressions</title>
		<link>http://www.last-child.com/media-2006-first-impressions/</link>
		<comments>http://www.last-child.com/media-2006-first-impressions/#comments</comments>
		<pubDate>Sat, 17 Jun 2006 09:28:33 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[atmedia]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[Standardista]]></category>
		<category><![CDATA[W3C]]></category>

		<guid isPermaLink="false">http://www.last-child.com/media-2006-first-impressions/</guid>
		<description><![CDATA[@media and the WCAG2 I was waiting for the WCAG2 smack down at this week&#8217;s @media conference in London. The stage was set for some serious smack talk and WWF style-insults. Heck, Joe Clark was even mentioned at least a half dozen times. But a surprising thing happened on stage. The presenters, Gez Lemon, Patrick [...]]]></description>
			<content:encoded><![CDATA[<h3>@media and the WCAG2</h3>
<p>
I was waiting for the WCAG2 smack down at this week&rsquo;s @media  conference in London.  The stage was set for some serious smack talk and WWF style-insults. Heck, Joe  Clark was even mentioned at least a half dozen times.</p>
<p>
But a surprising thing happened on stage. The presenters,  <a href="http://juicystudio.com/index.php">Gez Lemon</a>, <a href="http://www.splintered.co.uk/">Patrick Lauke</a>, <a href="http://stuffandnonsense.co.uk">Andy Clarke</a>, and <a href="http://www.ian-lloyd.com/">Ian Lloyd</a> didn&rsquo;t explode in  indignation. Rather, it was the opposite. The panel pulled out their hoses and  began putting out the WCAG2 fires.&nbsp; The  new guidelines are not perfect and nobody was close to agreeing to them. They  are overly complicated and confusing. This was agreed upon.</p>
<p>
However, they also seemed to agree that the guidelines were  not going to bring the four horsemen of the apocalypse to the web developing  community either. The guidelines are deliberately vague and technology-agnostic  to allow for future growth.&nbsp; Gez Lemon  pointed out a new part of the WCAG web site that allows you to print a  condensed set of guidelines for your specific technology, i.e. XHTML, SMIL,  CSS, etc.</p>
<p>
On the other hand, the number of people in the room that had  actually read the guidelines could be counted on two hands. Further, the number  of people that had read not only the guidelines, but also the supporting  documents could be counted on one hand doing a variety of gestures.</p>
<h3>@Media and the state of web design</h3>
<p>
It was a bit of a surprise to see the less discussion web  design&nbsp; at this year&rsquo;s conference. The  panels also discussed accessibility, web 2.0, &nbsp;<a href="http://www.microformats.org">microformats</a>, DOM scripting, hand-held  devices, CSS history, and internationalization. Dan Cederholm discussed his  bulletproof web designs, Nate Koechly discussed contrasting design considerations  for two Yahoo sites, and Andy Clarke discussed alternate inspirations for web  design. There was also a great panel with Veerle Pieters, John Hicks, and Cameron Moll about good vs. great design.</p>
<p><img src="http://static.flickr.com/44/168771337_32ad599571_m.jpg" alt="getting ready for Andy Clarke presentation"/></p>
<p>
At last year&rsquo;s event, <a href="http://fawny.org">Joe Clark</a> creating some buzz and  inspiration with his impassioned plea for single-column zoom layouts. You could  feel the energy as people began mentally designing their zoom layouts.</p>
<p>
This year Clarke, as in <a href="http://stuffandnonsense.co.uk">Andy Clarke</a>, set the stage for a  renaissance in design.&nbsp; Why concentrate  on grids when the result is the same old layout with a bit more perfection?  Instead, he suggested we take that grid and start playing hops scotch with it.  Make a practice grid and begin placing different shaped boxes until something  comes together that is exciting and new.</p>
<p>
He further showed how you could get layout inspiration from  newspapers, photographs, and fliers. A Japanese newspaper&rsquo;s layout looked the  most foreign to my eyes, as well as many others. Vertical and horizontal  sections seemed scattered around the page. Clarke super-imposed the grid onto  the page and introduced us to a new method of laying out a page.</p>
<p>
<a href="http://flickr.com/photos/hlb/148356109/" rel="http://hlb.yichi.org/blog/" title="photo of a chinese newspaper by hlb"><img src="http://static.flickr.com/51/148356109_7e5a058cc9_m.jpg" alt="Chinese newspaper" /></a><br />
Header, left column, right column, footer&hellip; yawn.&nbsp; It&rsquo;s easy, comfortable, and static. Clarke  suggests breaking free of these standards and moving your content around the  grid. Leave some open spage, add vertical bars and maybe even a framing device.</p>
<p>
He further challenged us to abandon the concept of graceful  degredation and move on to transcendental CSS design.&nbsp; Echoing the points of Nate Koechly&rsquo;s essay on  Yahoo&rsquo;s <a href="http://developer.yahoo.com/yui/articles/gbs/gbs.html">Graded Browser Support Grid</a>, Clarke suggested we begin coding for the  best browsers. We need to use CSS2 and possibly CSS3 elements. IE5 may not look  as good as Safari, but his gloss-black pinto with wrong-way flames isn&rsquo;t going  to impress the ladies as much as his Audi S4 convertible either. Do we continue  to downgrade the experience for everyone?&nbsp;  Or do we begin looking forward and push past today&rsquo;s limits?&nbsp; The introduction of IE7 this year will  hopefully solve much of the existing troubles and allow us to make this move  guilt-free.</p>
<h3>@media and Internet Explorer</h3>
<p>
<a href="http://www.meyerweb.com/">Eric Meyer</a> began the conference with a keynote about the  history of CSS, HTML, web design, and browsers. He set the stage for Internet  Explorer discussions that would span several presentations. Further, he placed  faces to the browsers, introducing many people to <a href="http://tantek.com">Tantek &Ccedil;elik</a> who has been  credited with the IE5 Mac goodness and Chris Wilson, who has been credited with the IE Windows goodness and badness. </p>
<p>
It&rsquo;s easy to look at the problems we have with IE6, an  outdated browser, and accuse the Internet Explorer team of being a bunch of  hacks who couldn&rsquo;t code their way out of a garbage sack.&nbsp; Meyer reminded the older developers and  taught the newer developers the history of the browser wars and how technically  advanced IE6 was for its time. &nbsp;In its  day, it was a great platform for accessibility and contemporary table-based web  design. </p>
<p>
Fortunately, we have moved beyond the table-based days and  other browsers have replaced Internet Explorer as the technology leader.&nbsp; Microsoft is playing catch up and Chris  Wilson came forward to pimp <a href="http://www.microsoft.com/windows/ie/default.mspx">IE7</a>. I also think many of the developers in  the room will have a harder time kvetching about IE6, the broken browser from  the behemoth beast of Redmond,  after seeing an actual person on stage saying how proud he was to have worked  on it. This geeky looking guy with a history of bad haircuts was also upset  about the deadtime between IE6 and IE7 and promised to do his best to continue  building better Internet Explorers in the future. </p>
<p>
Wilson  covered some of the required marketing points that most developers didn&rsquo;t really  care about. Security, blah, parental controls, blah, new controls, blah&hellip; better  RSS support, blah&hellip;&nbsp; I actually think IE7  does a great job with RSS, but Wilson  didn&rsquo;t discuss this very much. </p>
<p>
He did grab our attention with a new feature,  <a href="http://blogs.msdn.com/ie/archive/2005/09/14/466278.aspx">OpenSearch</a>.&nbsp; Developers can add a small  metatag in the document head that will allow the user to add their site to the  browser&rsquo;s built in search bar. You can allow the user to search your site from  a consistent location within the browser.&nbsp;  I couldn&rsquo;t tell if your site remained in the list of sites to search  from permanently or only while it was being viewed.&nbsp; I&rsquo;m going to look into the specs and try this  as soon as possible. </p>
<p>
Wilson  also went over the list of bugs that have been fixed and took questions from  people about future plans, backwards compatibility, and more.&nbsp; He didn&rsquo;t come across as the super-friendly,  super-smart, super-man like Tantek, the ex-Internet Explorer leader. But he did  put a human face to what many people considered their enemy and this is a good thing  for the future of web design.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/media-2006-first-impressions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Book Review: HTML and XHTML: The Definitive Guide</title>
		<link>http://www.last-child.com/book-review-html-and-xhtml-the-definitive-guide/</link>
		<comments>http://www.last-child.com/book-review-html-and-xhtml-the-definitive-guide/#comments</comments>
		<pubDate>Mon, 13 Mar 2006 04:59:27 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Book Resources]]></category>
		<category><![CDATA[Book Review]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML Elements]]></category>
		<category><![CDATA[W3C]]></category>

		<guid isPermaLink="false">http://www.last-child.com/book-review-html-and-xhtml-the-definitive-guide/</guid>
		<description><![CDATA[HTML &#38; XHTML: The Definitive Guide, an essential resource book for web programmers.]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://rcm.amazon.com/e/cm?t=csstoyslastch-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=059600382X&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;lc1=0000ff&#038;bc1=000000&#038;bg1=ffffff&#038;f=ifr" style="width:120px;height:240px; float:right; margin:5px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
<p>There are books you read that change your way of thinking (<a href="http://www.amazon.com/exec/obidos/ASIN/0735712018/csstoyslastch-20"><em>Designing with Web Standards</em></a>), books your read for ideas (<a href="http://www.amazon.com/exec/obidos/ASIN/1904151035/csstoyslastch-20"><em>Usability: The Site Speaks for Itself</em></a>), and books you keep within arm&#8217;s reach at all times.  This book, <a href="http://www.amazon.com/exec/obidos/ASIN/059600382/csstoyslastch-20"><em>HTML and XHTML: The Definitive Guide</em></a>, is one that you should always keep on your desk.</p>
<p>I&#8217;m saying this from experience. I&#8217;m a self-taught web programmer and have read over well over a dozen programming books during the past few years. This is the book that traveled with me from job to job.  It&#8217;s where I go to check on the proper use of tags and attributes. It&#8217;s a well laid-out reference book that is actually  interesting   to read. </p>
<h3>Who should get this book</h3>
<p>This book is for those working directly with HTML code. It does not discuss programming languages, JavaScript, or CSS to any extent. However, it clearly defines how to use valid markup to build sites. I have found it invaluable for building forms and complex data tables. It&#8217;s also a great foundation for those learning semantic markup from the beginning. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/book-review-html-and-xhtml-the-definitive-guide/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using vertical-align for images and buttons</title>
		<link>http://www.last-child.com/using-vertical-align-for-images-and-buttons/</link>
		<comments>http://www.last-child.com/using-vertical-align-for-images-and-buttons/#comments</comments>
		<pubDate>Tue, 28 Feb 2006 04:32:15 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Form]]></category>
		<category><![CDATA[Form Button]]></category>
		<category><![CDATA[vertical-align]]></category>
		<category><![CDATA[W3C]]></category>

		<guid isPermaLink="false">http://www.last-child.com/using-vertical-align-for-images-and-buttons/</guid>
		<description><![CDATA[I&#8217;m working on a basic search form and the visual design requires a graphic button instead of the browser-generated input. I&#8217;m using the button tag instead of an input type=&#8221;submit&#8221;. While putting the page together, I had a nagging issue with the button not aligning with the label and input. I tried various combinations of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a basic search form and the visual design requires a graphic button instead of the browser-generated input. I&#8217;m using the button tag instead of an input type=&#8221;submit&#8221;. While putting the page together, I had a nagging issue with the button not aligning with the label and input. I tried various combinations of margins, negative-margins, padding, and even floated the elements.  All of these techniques eventually worked, but the were too klunky and I knew there had to be a better way.</p>
<p>I remembered the <em>vertical-align:middle</em> style while working on a footer paragraph that included inline links and RSS buttons. I tried it with the submit button and it also worked perfectly.  I&#8217;ve tested this in FF 1.5 and IE6. I have not tested it in Safari yet.</p>
<h3>Code Examples</h3>
<p>CSS:<br />
<code lang="CSS"><br />
form#foo button {vertical-align:middle; border:none; padding:0; background:none; cursor:pointer; *cursor:hand; /*alternate cursor for IE*/}<br />
</code></p>
<p>HTML<br />
<code lang="XHTML"></p>
<form>...<br />
<button name="submit" type="submit"><br />
<img src="/images/btn-form-submit.png" alt="submit search form" /><br />
</button><br />
</code></p>
<h3>Resources</h3>
<ul>
<li><a href='http://www.w3.org/Style/XSL/TestSuite/contrib/XEP/Tests/images-inline.pdf#search='' '>W3.Org test (.pdf)</a></li>
<li><a href="http://www.w3.org/Style/Examples/007/center.html#vertical">W3.Org example</a></li>
<li><a href="http://www.meyerweb.com/eric/css/tests/css2/sec10-08b.htm">Eric Meyer&#8217;s CSS2 test</a></li>
<li><a href="http://rollyo.com/search.html?q=vertical-align%3Amiddle&#038;sid=4886">Standardista search for vertical-align</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/using-vertical-align-for-images-and-buttons/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Standards-based web development resources made even easier</title>
		<link>http://www.last-child.com/standards-based-web-development-resources-made-even-easier/</link>
		<comments>http://www.last-child.com/standards-based-web-development-resources-made-even-easier/#comments</comments>
		<pubDate>Sun, 26 Feb 2006 02:16:16 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Online Resource]]></category>
		<category><![CDATA[Standardista]]></category>
		<category><![CDATA[W3C]]></category>

		<guid isPermaLink="false">http://www.last-child.com/standards-based-web-development-resources-made-even-easier/</guid>
		<description><![CDATA[Chris Pederick of the all mighty Web Developer Toolbar mentioned a great service today on his blog. Rollyo allows you to create your own personal search page that is super easy to build. I’ve jumped at the chance to build a firefox toolbar to search the best standards-based resources available (and my site to boot.) [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://chrispederick.com/blog/">Chris Pederick</a> of the all mighty Web Developer Toolbar mentioned a great service today on his blog. <a href="http://www.rollyo.com/index.html">Rollyo</a> allows you to create your own personal search page that is super easy to build.</p>
<p>I’ve jumped at the chance to build a firefox toolbar to search the best standards-based resources available (and my site to boot.) I simply created a Rollyo page and then created the Firefox search plugin to use it.</p>
<p>I don’t have time to create the super-easy javascript link right now, but here’s how you can install it in two minutes.</p>
<ol>
<li>Download these two files: <a href="http://www.tdrake.net/standardistas.src">standardistas.src</a>, <a href="http://www.tdrake.net/standardistas.gif">standardistas.gif</a></li>
<li>Place them in your program files/mozilla firefox/searchplugins directory</li>
<li>Restart Firefox.</li>
</ol>
<h3>Or…</h3>
<p>Visit the new Rollyo &#8211; <a href="http://rollyo.com/search.html?sid=4886&#038;f=share">Standardista</a> page and click on the Add to Firefox link on the right sidebar. This approach will give you a generic Rollyo icon in the search box.</p>
<h3>Summary</h3>
<p>In one simple search you can get the relevant information from all of these sites without having to swim through thousands of extraneous results.</p>
<ul>
<li><a href="http://www.alistapart.com">alistapart.com</a></li>
<li><a href="http://www.w3.org">w3.org</a></li>
<li><a href="http://www.simplebits.com">simplebits.com</a></li>
<li><a href="http://www.meyerweb.com">meyerweb.com</a></li>
<li><a href="http://www.stuffandnonsense.co.uk">stuffandnonsense.co.uk</a></li>
<li><a href="http://www.shauninman.com">shauninman.c…</a></li>
<li><a href="http://www.splintered.co.uk">splintered.co.uk</a></li>
<li><a href="http://www.stopdesign.com">stopdesign.com</a></li>
<li><a href="http://www.andybudd.com">andybudd.com</a></li>
<li><a href="http://www.jasonsantamaria.com">jasonsantamaria.com</a></li>
<li><a href="http://www.accessify.com">accessify.com</a></li>
<li><a href="http://www.clagnut.com">clagnut.com</a></li>
<li><a href="http://www.456bereastreet.com">456bereastreet.com</a></li>
<li><a href="http://www.quirksmode.org">quirksmode.org</a></li>
<li><a href="http://www.tantek.com">tantek.com</a></li>
<li><a href="http://www.positioniseverything.net">positioniseverything.net</a></li>
<li><a href="http://www.tdrake.net">tdrake.net</a></li>
<li><a href="http://www.zeldman.com">zeldman.com</a></li>
</ul>
<p>I’ve added more standardistas to the list:</p>
<ul>
<li><a href="http://www.sitepoint.com">sitepoint.co…</a></li>
<li><a href="http://www.tanfa.co.uk">tanfa.co.uk</a></li>
<li><a href="http://www.stylegala.com">stylegala.co…</a></li>
<li><a href="http://www.kottke.org">kottke.org</a></li>
<li><a href="http://www.wpdfd.com">wpdfd.com</a></li>
</ul>
<h3>The Future</h3>
<p>I begin working with <strong>Yahoo!</strong> in a week. I had planned on building a page using their search <acronym title="Application Programming Interface">API</acronym> in the near future. Go ahead and download this Firefox toolbar plugin.  I will be adding this to the mozdev archive and when I make the new Yahoo! version, your toolbar will actually update itself.  As <a href="http://christopherlowell.com/">Christopher Lowell</a> would say: “How cool is that?!”</p>
<p>&#8211;This post was originally published on <a xhref="http://www.tdrake.net">www.tdrake.net</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/standards-based-web-development-resources-made-even-easier/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Attribute selectors to provide language information</title>
		<link>http://www.last-child.com/attribute-selectors-to-provide-language-information/</link>
		<comments>http://www.last-child.com/attribute-selectors-to-provide-language-information/#comments</comments>
		<pubDate>Sun, 26 Feb 2006 01:33:27 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[:after]]></category>
		<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[attribute selector]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS2]]></category>
		<category><![CDATA[Image Sprites]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[padding]]></category>
		<category><![CDATA[W3C]]></category>

		<guid isPermaLink="false">http://www.last-child.com/attribute-selectors-to-provide-language-information/</guid>
		<description><![CDATA[Attribute Selectors for International Web Sites Sébastien Guillon, recently wrote a post about using the CSS2 attribute selector and content rule to let visitors know what to expect when clicking on a link to an international web site. Inspired by his approach, I’ve simplified some of the code and added background images to represent the [...]]]></description>
			<content:encoded><![CDATA[<h3>Attribute Selectors for International Web Sites</h3>
<p><a hreflang="fr-fr" href="http://sebastienguillon.com/journal/2005/10/exploiter-les-langues-avec-les-pseudo-classes-css">Sébastien Guillon</a>, recently wrote a post about using the CSS2 attribute selector and content rule<br />
to let visitors know what to expect when clicking on a link to an international web site. Inspired by his approach, I’ve simplified some of the code and added background images to<br />
represent the countries.</p>
<p>Guillon’s original project focused on adding a text description after the link in the site’s native language. To do this, he used a set of descending selectors to look at the page’s language declaration and the link’s hreflang attribute.  I am assuming the site that hosts this <acronym title="Cascading Style Sheets">CSS</acronym> is in english. However, it would not be difficult for you to simply change the generated content if your site is written in French, Spanish,<br />
Swahili, etc.</p>
<h3>Sample list of international Yahoo sites</h3>
<h4>Europe</h4>
<ul>
<li><a hreflang="ca" href="http://ct.yahoo.com/">Catalan</a></li>
<li><a hreflang="da-dk" href="http://dk.yahoo.com/">Denmark</a></li>
<li><a hreflang="fr-fr" href="http://fr.yahoo.com/">France</a></li>
<li><a hreflang="de-de" href="http://de.yahoo.com/">Germany</a></li>
<li><a hreflang="el-gr" href="http://gr.yahoo.com/">Greece</a></li>
<li><a hreflang="it-it" href="ithttp://it.yahoo.com/">Italy</a></li>
<li><a hreflang="no-no" href="http://no.yahoo.com/">Norway</a></li>
<li><a hreflang="sp-sp" href="http://es.yahoo.com/">Spain</a></li>
<li><a hreflang="sv-se" href="http://se.yahoo.com/">Sweden</a></li>
<li><a hreflang="en-gb" href="http://uk.yahoo.com/">UK </a></li>
<li><a hreflang="en-ie" href="http://uk.yahoo.com/"> Ireland</a></li>
</ul>
<p>Now look at the <a href="/international.html">final version with new <acronym title="Cascading Style Sheets">CSS</acronym></a>. Internet Explorer users will not see a difference, try <a href="http://www.mozilla.org">Firefox</a> or <a href="http://www.opera.com">Opera</a>. <ins>Internet Explorer 7 beta 2 shows the flags but does not show the generated content.</ins></p>
<h3>The hreflang Attribute</h3>
<p>The hreflang allows the user/browser to define the language of a link’s targeted page to avoid presenting<br />
unreadable information:</p>
<blockquote cite="http://www.w3.org/TR/html401/struct/links.html#adef-hreflang"><p>The hreflang attribute provides user agents with information about the language of a resource at the end of a link, just as the lang attribute provides information about the language of an element’s content or attribute values.</p>
<p><cite><acronym title="World Wide Web Consortium">W3C</acronym>.org</cite></p></blockquote>
<p>The hreflang attribute defines the language of the web site you are sending someone to. The language is defined with a two letter abbreviation, such as en, fr, sp… You can also define the locality of this language by adding the country code to this language.  This is particularly helpful for languages that have dialects. A Mexican site would have this attribute: hreflang=”sp-mx”.</p>
<h3>The Attribute Selector</h3>
<p>CSS2 allows us to look for tags that contain specific attributes.  We can look for blockquotes with cite attributes, tables with summaries, table cells with header attributes,<br />
and our little friend, the link with an hreflang attribute.</p>
<p><code lang="CSS"><br />
/*English */<br />
a[hreflang="en"]:after, a[hreflang|="en"]:after {content:"\A0(In English)";}<br />
</code></p>
<h3>Breaking it down</h3>
<p>This rule uses a combination of attribute selector and pseudo-class to transform the link from common to fabulous.</p>
<dl>
<dt> a[…]</dt>
<dd>Look for a link with an attribute</dd>
<dt>hreflang=”en”</dt>
<dd>The hreflang attribute must include the letters “en”. This allows the <acronym title="Cascading Style Sheets">CSS</acronym> to work on links that do not define a country variation</dd>
<dt>:after</dt>
<dd>This pseudoselector defines the space after the link</dd>
<dt>{content:”\A0(In English)”;}</dt>
<dd>After the link, place the following text: (In English)</dd>
<dt>hreflang|=”en”</dt>
<dd>The hreflang attribute must include the letters “en” within a hyphenated set, i.e. en-us, en-ca, …</dd>
</dl>
<h3>Adding the flag</h3>
<p>Now that we’ve notified the user about what language the link will be in, let’s tell them the country the site is from. Once again, we will look at the hreflang attribute for this information. This rule is not as neat and tidy. For each country, we are going to look for all of the possible language attributes. For instance, Canadian links could have hreflang=”fr-ca” and hreflang=”en-ca”.</p>
<p><code lang="CSS"><br />
/*Canada */<br />
a[hreflang="en-ca"], a[hreflang="fr-ca"] {background:<acronym title="Uniform Resource Locator">URL</acronym>(flag-sprite.png) no-repeat 0 0; padding-left:35px;}<br />
</code></p>
<p>This time, we will give links that have Canadian country codes 35px padding to the left side and a background image of the Canadian flag that sits to the<br />
left edge of the link’s text.  This style sheet is using an image sprite to keep the server requests to a minimum.  See the Alistapart.com article about using<br />
<a href="http://www.alistapart.com/articles/sprites">image sprites</a> for more information on this technique.</p>
<h3 lang="fr">Et Voilà</h3>
<p>There we have it. A set of international links with the country of origin and language clearly defined.  All of this has been made possible by our friends, the<br />
attribute selector, the pseudo-class, and the content style. Tune in next week as we learn how to make a cruise ship out of two<br />
shoe-boxes and an <acronym title="eXtensible Markup Language">XML</acronym> schema.</p>
<h3>Fine Print</h3>
<p>This has not been tested in Safari, but it shouldn’t be a problem. The pretty and useful presentation elements will not appear in <acronym title="Internet Explorer">IE</acronym>6, NN4, and probably<br />
most alternative devices (My Treo shows the flags but not the added content). I do not know how assistive devices would render these styles, more than likely they would be ignored. This project falls under<br />
the “build for the best, don’t hurt the rest™” protocol.</p>
<h3>Resources</h3>
<ul>
<li><a href="http://www.w3.org/TR/REC-CSS2/selector.html"><acronym title="World Wide Web Consortium">W3C</acronym> Selectors</a></li>
<li><a hreflang="fr-fr" href="http://sebastienguillon.com/journal/2005/10/exploiter-les-langues-avec-les-pseudo-classes-css">Exploiter les langues avec les pseudo-classes <acronym title="Cascading Style Sheets">CSS</acronym></a></li>
<li><a href="http://www.stuffandnonsense.co.uk/archives/css_a_tribute_to_selectors.html">A tribute to selectors</a> &#8211; Andy Clarke</li>
<li><a href="http://www.meyerweb.com/eric/articles/webrev/200008b.html">Attribute Selectors Part II</a> &#8211; Eric Meyers</li>
<li><a href="http://rollyo.com/search.html?q=hreflang&#038;sid=4886&#038;start=16">hreflang resources</a> &#8211; Standardistas</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/attribute-selectors-to-provide-language-information/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

