<?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; Browsers</title>
	<atom:link href="http://www.last-child.com/category/browsers/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>Yahoo! to downgrade IE6 in 2011</title>
		<link>http://www.last-child.com/yahoo-to-downgrade-ie6-in-2011/</link>
		<comments>http://www.last-child.com/yahoo-to-downgrade-ie6-in-2011/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 15:28:55 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[YUI]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[GBS]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[IE6]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=262</guid>
		<description><![CDATA[Yahoo! introduced the Graded Browser Support grid years ago to give developers a guideline on what browsers deserved the greatest amount of resources for debugging, hacking, and development. This has been well received amongst the developer community as a justification for not dwelling on obscure browsers, such as IE5.5 for mac. This has made our [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://developer.yahoo.com/yui"><img src="http://l.yimg.com/a/i/ydn/icons/yui.png" alt="Yahoo User Interface Library"/></a>Yahoo! introduced the <a href="http://developer.yahoo.com/yui/articles/gbs/">Graded Browser Support</a> grid years ago to give developers a guideline on what browsers deserved the greatest amount of resources for debugging, hacking, and development. This has been well received amongst the developer community as a justification for not dwelling on obscure browsers, such as IE5.5 for mac. This has made our code cleaner and easier to maintain as the browser-specific hacks are no longer needed.</p>
<p>Yahoo just announced the GBS change we&#8217;ve all been waiting for. <strong>IE6 will be downgraded to a C-status browser in Q1, 2011.</strong> This means I can finally upgrade my own laptop to IE8! This means we can focus on building for the future and not the past. Excuse me as I hyperventilate over the joy.</p>
<blockquote><p>
<strong>Internet Explorer 6:</strong> We are forecasting the transition of Internet Explorer 6 from A-grade to C-grade in the next GBS update. The calculus here is simple: The proliferation of devices and browsers on the leading edge (including mobile) requires an increase in testing and attention. That testing and attention should come from shifting resources away from the trailing edge. By moving IE6 to the C-grade, we ensure a consistent baseline experience for those users while freeing up cycles to invest in richer experiences for millions of users coming to the internet today on modern, capable browsers. Note: This forecast should not be taken as an indication that IE6 users will see an abrupt change in their experience of Yahoo! websites in Q1 2011; the change in philosophy toward IE6 will be reflected in new development and products and applied in ways that make sense based on product needs.<br />
<cite><a href="http://www.yuiblog.com/blog/2010/11/03/gbs-update-2010q4/">Graded Browser Support Update: Q4 2010</a> &#8211; Eric Miraglia and Matt Sweeney, Yahoo! Developer Network</cite><br />
</blockqoute></p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/yahoo-to-downgrade-ie6-in-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross-browser HTML5 video tag with fallback for Flash users</title>
		<link>http://www.last-child.com/cross-browser-html5-video/</link>
		<comments>http://www.last-child.com/cross-browser-html5-video/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 17:00:44 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Online Resource]]></category>
		<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[apple]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=235</guid>
		<description><![CDATA[Apple&#8217;s lack of support for Flash on the iPhone and iPad has forced people to reconsider the value of HTML5 and its video tag. It&#8217;s no longer something to put off until the future. However, adding HTML5 video support to your site AND continue to provide a Flash option for older browsers (I.E.) is not [...]]]></description>
			<content:encoded><![CDATA[<p>Apple&#8217;s lack of support for <a href="http://www.amazon.com/gp/product/B003B32AJ2?ie=UTF8&#038;tag=csstoyslastch-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B003B32AJ2">Flash</a><img src="http://www.assoc-amazon.com/e/ir?t=csstoyslastch-20&#038;l=as2&#038;o=1&#038;a=B003B32AJ2" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> on the <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26x%3D0%26ref_%3Dnb%5Fsb%5Fnoss%26y%3D0%26field-keywords%3Diphone%2520%26url%3Dsearch-alias%253Delectronics&#038;tag=csstoyslastch-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=390957">iPhone</a><img src="https://www.assoc-amazon.com/e/ir?t=csstoyslastch-20&#038;l=ur2&#038;o=1" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> and <a href="http://www.amazon.com/gp/product/B003K824EO?ie=UTF8&#038;tag=csstoyslastch-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B003K824EO">iPad</a><img src="http://www.assoc-amazon.com/e/ir?t=csstoyslastch-20&#038;l=as2&#038;o=1&#038;a=B003K824EO" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> has forced people to reconsider the value of HTML5 and its video tag. It&#8217;s no longer something to put off until the future. However, adding HTML5 video support to your site AND continue to provide a Flash option for older browsers (I.E.) is not as simple as you might expect.</p>
<p>While the video tag has been standardized, there is a lack of consensus for supporting the <a href="http://en.wikipedia.org/wiki/Video_codec">codecs</a> used to package the videos for distribution and playback. Some browsers are supporting the  OGV format, some support the more popular but licensed mp4 format. Others, such as Chrome, will support both. To make it even more exciting, there is a new version under development to make a truly open-sourced format: <a href="http://en.wikipedia.org/wiki/Webm">WebM</a>. </p>
<p>This means your video tag needs to define multiple movie sources to make it playable on all browsers. It sounds complicated because it is. Luckily, <a href="http://camendesign.com/">Kroc Camen</a> has written a great article and code pattern for adding a cross-browser video tag with fallback to Flash for the older browsers: <a href="http://camendesign.com/code/video_for_everybody">Video for Everybody!</a>.</p>
<p>The article is full of great advice from a programmer that has learned the stuff the hard way. Here&#8217;s an explanation of how you&#8217;ll need to adjust your <a href="http://en.wikipedia.org/wiki/Htaccess">htaccess</a> file.</p>
<blockquote cite="http://camendesign.com/code/video_for_everybody">
<p>
			Ensure your server is using the correct mime-types. <cite>Firefox</cite> will <strong>not</strong><br />
			play the OGG video if the mime-type is wrong. Place these lines in your <samp>.htaccess</samp><br />
			file to send the correct mime-types to browsers
		</p>
<pre><code>
AddType video/ogg  .ogv
AddType video/mp4  .mp4
AddType video/webm .webm</code></pre>
<p><cite><a href="http://camendesign.com/code/video_for_everybody">Video for Everybody!</a> &#8211; Kroc Camen</cite>
</p></blockquote>
<h3>Related Resources</h3>
<ul>
<li><a href="http://speckyboy.com/2010/04/23/html5-video-libraries-toolkits-and-players/">HTML5 video Libraries, Toolkits and Players</a> &#8211; Specky Boy</li>
<li><a href="http://www.longtailvideo.com/players/jw-flv-player/">JW Player: Flash Video Player</a> &#8211; a base flash movie to use as your fallback flash movie</li>
<li><a href="http://hacks.mozilla.org/2009/06/html5-video-fallbacks-markup/">html5 video fallbacks with markup</a>  &#8211; Mozilla Hacks</li>
<li><a href="http://www.archive.org/details/FedFlix">Fed Flix</a> &#8211; Repository of US Government films in various formats. These are good for testing your video markup.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/cross-browser-html5-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ARIA support with the YUI library</title>
		<link>http://www.last-child.com/aria-support-with-the-yui-library/</link>
		<comments>http://www.last-child.com/aria-support-with-the-yui-library/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 16:15:51 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[DHTML]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=157</guid>
		<description><![CDATA[AJAX and DHTML have made web sites more interactive and easier to use. At least for visitors who are not using a screen reader. Screen reader users have to struggle with pages that lose focus, change without prompting the user of new data, and much more. However, there are many developers working on solutions to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29" title="Ajax (programming)" rel="wikipedia" class="zem_slink">AJAX</a> and <a href="http://en.wikipedia.org/wiki/Dynamic_HTML" title="Dynamic HTML" rel="wikipedia" class="zem_slink">DHTML</a> have made  web sites more interactive and easier to use. At least for visitors who are  not using a screen reader. Screen reader users have to struggle with pages that lose focus, change without prompting the user of new data, and much more. However, there are many developers working on solutions to this problem.</p>
<p>Todd Kloots, of the Yahoo User Interface group was one of the first to develop accessible javascript libraries with the YUI menu package. He just published a blog post on the YUI web site about adding ARIA support to the YUI tab package. This information could also help you add this functionality to your existing YUI-based applications. </p>
<p>Here&#8217;s how Todd describes the goal</p>
<blockquote cite="http://yuiblog.com/blog/2008/07/30/tabview-aria/">
<p>
The <a href="http://developer.yahoo.com/yui/tabview/">YUI TabView Control</a> is built on a strong<br />
foundation of semantic markup that provides users with some basic accessibility.  But while TabView looks like a desktop tab control, <a href="http://en.wikipedia.org/wiki/Screen_reader" title="Screen reader" rel="wikipedia" class="zem_slink">screen readers</a> don’t present it as an atomic<br />
widget, leaving users to figure out how the various HTML elements that compose a TabView relate to each other.  However, through the application of the <a href="http://www.w3.org/TR/wai-aria/">WAI-ARIA Roles and States</a>, it is possible to enhance TabView’s accessibility such that users of screen readers perceive it as a desktop tab control.
</p>
<p><cite><a href="http://yuiblog.com/blog/2008/07/30/tabview-aria/">Enhancing TabView Accessibility with WAI-ARIA Roles and States</a>  &#8211; Todd Kloots</cite>
</p></blockquote>
<p>The following video shows how this approach works with Firefox and a screen reader.</p>
<div><object height="322" width="512"><param name="movie" value="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.17"><param name="allowFullScreen" value="true"><param name="bgcolor" value="#000000"><param name="flashVars" value="id=9051193&amp;vid=3199866&amp;lang=en-us&amp;intl=us&amp;thumbUrl=http%3A//us.i1.yimg.com/us.yimg.com/p/i/bcst/videosearch/4371/69134473.jpeg&amp;embed=1"><embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.17" type="application/x-shockwave-flash" allowfullscreen="true" bgcolor="#000000" flashvars="id=9051193&amp;vid=3199866&amp;lang=en-us&amp;intl=us&amp;thumbUrl=http%3A//us.i1.yimg.com/us.yimg.com/p/i/bcst/videosearch/4371/69134473.jpeg&amp;embed=1" height="322" width="512"></object><br /><a href="http://video.yahoo.com/watch/3199866/9051193">YUI TabView with ARIA roles and states/Todd Kloots</a> @ <a href="http://video.yahoo.com">Yahoo! Video</a></div>
<h3>Related articles </h3>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://arstechnica.com/news.ars/post/20080708-ibm-makes-web-accessibility-for-blind-users-a-social-effort.html">IBM makes web accessibility for blind users a social effort</a></li>
<li class="zemanta-article-ul-li"><a href="http://ajaxian.com/archives/accessible-google-charts">Accessible Google Charts</a></li>
<li class="zemanta-article-ul-li"><a href="http://ajaxian.com/archives/axsjax-access-enabling-ajax">AxsJAX: Access-Enabling AJAX</a></li>
<li class="zemanta-article-ul-li"><a href="http://www.nytimes.com/idg/IDG_852573C4006938800025747F007CBD5E.html?partner=rssnyt&amp;emc=rss">I.B.M. Software Enhances Web Accessibility for the Blind</a></li>
<li class="zemanta-article-ul-li"><a href="http://www.ajaxperformance.com/2007/08/29/quick-follow-up-more-yui-compressor-work/">Quick follow-up: more YUI Compressor work</a></li>
<li class="zemanta-article-ul-li"><a href="http://ajaxian.com/archives/high-performance-ajax-applications">High Performance Ajax Applications</a></li>
<li class="zemanta-article-ul-li"><a href="http://ajaxian.com/archives/reminded-of-speaking-your-yahoolang">Reminded of speaking your YAHOO.lang</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/aria-support-with-the-yui-library/feed/</wfw:commentRss>
		<slash:comments>0</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>
		<item>
		<title>Internet Explorer 8 beta released for testing</title>
		<link>http://www.last-child.com/internet-explorer-8-beta-released-for-testing/</link>
		<comments>http://www.last-child.com/internet-explorer-8-beta-released-for-testing/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 22:50:10 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[attribute selector]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[Online Resource]]></category>

		<guid isPermaLink="false">http://www.last-child.com/internet-explorer-8-beta-released-for-testing/</guid>
		<description><![CDATA[The MIX 2008 conference is this week and Microsoft is showing off some of their latest tools. One of these is the much anticipated and discussed Internet Explorer 8 browser. It&#8217;s important to remember that this is still a beta 1 release and is much better than the IE7 beta 1. This one actually has [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://visitmix.com/2008/default.aspx">MIX 2008 conference</a> is this week and Microsoft is showing off some of their latest tools. One of these is the much anticipated and discussed <a href="http://technorati.com/blogs/tag/Internet+Explorer+8">Internet Explorer 8</a> browser. It&#8217;s important to remember that this is still a beta 1 release and is much better than the IE7 beta 1. This one actually has significant changes.</p>
<h3>Download Internet Explorer 8</h3>
<p>You can download <a href="http://www.microsoft.com/windows/products/winfamily/ie/ie8/getitnow.mspx">Internet Explorer 8, Beta 1</a> from the Microsoft Developer site. However, here are a few things to keep in mind:</p>
<ol>
<li>This installation takes some time, about 15 minutes, and will require a restart of your computer.</li>
<li>It will replace your existing Internet Explorer and is not available as a stand-alone browser.</li>
<li>It renders in standards-mode as a default. You&#8217;ll see a button to render in IE7 mode. This is helpful to see the changes between the versions.</li>
<li>Many sites will have significant layout issues in the standard view. You may need to re-evaluate your conditional comments to specify <strong>IE7</strong> instead of <strong>greater than IE6</strong></li>
<li>IE8 is ignoring the * hack!  This means you can use the underscore hack for IE6, the * hack for IE6 and IE7 and &#8230; um&#8230; I don&#8217;t know yet for IE8. </li>
</ol>
<h3>Is IE8 better than IE7?</h3>
<ul>
<li>Internet Explorer 8 passes the <a href="http://www.webstandards.org/files/acid2/test.html#top">Acid2 Test</a>.  </li>
<li>It understands CSS attribute selectors and generated content.<br />
IE8 handles my <a href="http://www.last-child.com/attribute-selectors-to-provide-language-information/">international test page</a> fine. </li>
<li>It understands :hover on non-links but is still buggy. Here&#8217;s a good <a href="http://thomthom.net/storage/markup/html/sitenav/">test page with multiple CSS3 styles</a>.</li>
<li>It seems to have more integration with social platforms, maps, etc. Perhaps this is a nod towards <a href="http://flock.com">Flock</a>?</li>
</ul>
<p>It&#8217;s still really early to find all of the bugs and benefits of the new browser. The team needs to be commended for the fast development  and their willingness to listen to criticism and change the default behavior at such a late point. I look forward to the more mature releases.</p>
<h3>Updates</h3>
<ul>
<li>Leave it to <a href="http://blog.hedgerwow.com/">Hedger Wang</a> to find and document the first IE8 bug: <a href="http://blog.hedgerwow.com/2008/03/05/see-how-ie8-breaks/">See how IE8 breaks</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/internet-explorer-8-beta-released-for-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ready to try a different browser</title>
		<link>http://www.last-child.com/ready-to-try-a-different-browser/</link>
		<comments>http://www.last-child.com/ready-to-try-a-different-browser/#comments</comments>
		<pubDate>Wed, 05 Sep 2007 18:52:58 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Opera]]></category>

		<guid isPermaLink="false">http://www.last-child.com/ready-to-try-a-different-browser/</guid>
		<description><![CDATA[I&#8217;ve been frustrated lately with Firefox. It has been crashing several times a day on my laptop, eating up memory, and slow to start. Perhaps I have too many extensions, perhaps the browser has gotten too heavy, perhaps I&#8217;ve gotten too comfortable with it. So, it&#8217;s time to try another browser: Opera. I&#8217;ve tried Opera [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://opera.com"><img src="http://www.opera.com/img/operalogo.gif" alt="Opera Software" /></a>I&#8217;ve been frustrated lately with <a href="http://firefox.com">Firefox</a>. It has been crashing several times a day on my laptop, eating up memory, and slow to start. Perhaps I have too many extensions, perhaps the browser has gotten too heavy, perhaps I&#8217;ve gotten too comfortable with it. So, it&#8217;s time to try another browser: <a href="http://Opera.com">Opera</a>.</p>
<p>I&#8217;ve tried Opera before and have always had it on my machine. However, there are a few things I&#8217;ve become dependent on in Firefox and need to figure out how to do the same thing in Opera before making a permanent move.</p>
<h3>Firefox dependencies</h3>
<ul>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/425">Linky</a>: I love this extension and the ability to select a bunch of links and open them in separate tabs. I think Opera has native support for this, but I couldn&#8217;t figure it out.</li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/1843">Firebug</a> and <a href="https://addons.mozilla.org/en-US/firefox/addon/60">Web Developer Toolbar</a>: How can we live without them?</li>
<li>Bookmark toolbar on the top. I&#8217;ve already got my bookmarks setup and need to access them quickly. I don&#8217;t like the sidebar treatment in Opera</li>
<li>Password memory: the Opera system so far seems clunky. How do I get it to remember my password after entering a protected domain, i.e. internal network</li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/125">Switch Proxy</a>: This firefox extension lets me switch my proxy instantly.</li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/1542">Pimpzilla</a>: ok, I can live without this theme, but it is pretty darn nifty</li>
</ul>
<h3>Help?</h3>
<p>If you are an Opera user, leave a comment on how to solve some of these issues. I&#8217;m sure I&#8217;m not the only one out there that would like to know. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/ready-to-try-a-different-browser/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Web Accessibility Toolbar for Opera</title>
		<link>http://www.last-child.com/web-accessibility-toolbar-for-opera/</link>
		<comments>http://www.last-child.com/web-accessibility-toolbar-for-opera/#comments</comments>
		<pubDate>Tue, 17 Apr 2007 16:10:40 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Online Resource]]></category>
		<category><![CDATA[Opera]]></category>

		<guid isPermaLink="false">http://www.last-child.com/web-accessibility-toolbar-for-opera/</guid>
		<description><![CDATA[Hot off the presses. Download the Web Accessibility Toolbar for Opera if you are an Opera user or develop for Opera as a supported browser. The Web Accessibility Toolbar has been developed to aid manual examination of web pages for a variety of aspects of accessibility. It consists of a range of functions that: identify [...]]]></description>
			<content:encoded><![CDATA[<p>Hot off the presses. Download the <a href="http://www.paciellogroup.com/resources/wat-about.html">Web Accessibility Toolbar</a> for Opera if you are an Opera user or develop for Opera as a supported browser.</p>
<blockquote cite="http://www.paciellogroup.com/resources/wat-about.html">
<p>The Web Accessibility Toolbar has been developed to aid manual examination of web pages for a variety of aspects of accessibility. It consists of a range of functions that:</p>
<ul>
<li>identify components of a web page</li>
<li>facilitate the use of 3rd party online applications</li>
<li>provide links to references and additional resources.</li>
</ul>
<p><cite><a href="http://www.paciellogroup.com/">The Paciello Group</a></cite>
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/web-accessibility-toolbar-for-opera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Browser wars get the star geek treatment</title>
		<link>http://www.last-child.com/browser-wars-get-the-star-geek-treatment/</link>
		<comments>http://www.last-child.com/browser-wars-get-the-star-geek-treatment/#comments</comments>
		<pubDate>Mon, 12 Feb 2007 17:14:00 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[DHTML]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Standardista]]></category>
		<category><![CDATA[Yahoo!]]></category>

		<guid isPermaLink="false">http://www.last-child.com/browser-wars-get-the-star-geek-treatment/</guid>
		<description><![CDATA[The Web Sig in the Silicon Valley is putting together a very impressive meeting at the end of the month. Browser Wars, it&#8217;s a spoof of Star Wars and the dreaded browser wars of the 90&#8242;s. I&#8217;m the first to cringe when someone discusses Star Trek or Star Wars in reverential tones. The theme alone [...]]]></description>
			<content:encoded><![CDATA[<p>The Web Sig in the Silicon Valley is putting together a very impressive meeting at the end of the month. <a href="http://www.svwebbuilder.com/">Browser Wars</a>, it&#8217;s a spoof of Star Wars and the dreaded browser wars of the 90&#8242;s. </p>
<p><img id="image116" src="http://www.last-child.com/wp-content/uploads/2007/02/browserwars.jpg" alt="Browser Wars" /><br />
I&#8217;m the first to cringe when someone discusses Star Trek or Star Wars in reverential tones. The theme alone is enough for me to think twice about this event. However, this night at the Yahoo! campus will bring out the big guns of the browsers (<a href="http://blogs.msdn.com/cwilso/">Chris Wilson</a> from IE, Mike Shaver from FireFox, and <a href="http://www.devarticles.com/c/a/HTML/Virtual-Interview-Hakon-Wium-Lie/">Håkon Wium Lie</a> from Opera are members of W3C). </p>
<p>The three of them will discuss the DOM object, the future of browsers, and more. Here&#8217;s a snippet of the announcement.</p>
<blockquote><p>
Attack of the DOMs is very relevant in this Browser Wars Episode II as Web 2.0 increasingly utilizes AJAX in interface design, functionality and web applications. Each browser implements its supported DOM. IE7 is known to suffer in performance from memory leaks that are related to its inherited DOM architectural design. Firefox quickly gains popularity with its DOM strategy among Web 2.0 communities with faster loading time. DOM Level 2 CSS allows programs and scripts to dynamically access and update the content and of style sheets documents. No designers can deny the importance of the interaction between CSS and DOM in rendering site design properly across browsers.<br />
<cite><a href="http://browserwarii.eventbrite.com/?invite=MjE5NDcvdGRyYWtlQHlhaG9vLWluYy5jb20vMQ%3D%3D%0A">Web Sig</a></cite>
</p></blockquote>
<p>If you are in the Silicon Valley, hurry up and reserve your seating today! This will fill up quickly and you shouldn&#8217;t pass up the opportunity to see Håkon Wium Lie, the inventor of CSS and one of the original creators of the &#8220;internet&#8221;. The event is free to attend and Yahoo! will provide snacks and free sodas.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/browser-wars-get-the-star-geek-treatment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

