<?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; CSS</title>
	<atom:link href="http://www.last-child.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.last-child.com</link>
	<description>CSS Toys for Professional Web Developers</description>
	<lastBuildDate>Thu, 08 Jul 2010 16:59:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>A quick CSS3 sibling test with the video tag</title>
		<link>http://www.last-child.com/css3-sibling-with-video-tag/</link>
		<comments>http://www.last-child.com/css3-sibling-with-video-tag/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 15:56:31 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[:absolute]]></category>
		<category><![CDATA[:block]]></category>
		<category><![CDATA[:focus]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[Siblings]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[position]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=240</guid>
		<description><![CDATA[I am working on a little widget that uses the html5 video tag on one of my test sites: Fyvr.net. I wanted to display related information when the video is playing. The sibling selector makes this easy. Here&#8217;s the basic markup &#60;li> &#60;video>...&#60;/video> &#60;p>...&#60;/p> &#60;/li> I wanted the paragraph to appear when the video is [...]]]></description>
			<content:encoded><![CDATA[<p>I am working on a little widget that uses the html5 video tag on one of my test sites: <a href="http://fyvr.net">Fyvr.net</a>.<br />
I wanted to display related information when the video is playing.  The sibling selector makes this easy. </p>
<p>Here&#8217;s the basic markup</p>
<pre><code lang="HTML">
&lt;li>
&lt;video>...&lt;/video>
&lt;p>...&lt;/p>
&lt;/li>
</code>
</pre>
<p>I wanted the paragraph to appear when the video is selected. So here&#8217;s the simple CSS</p>
<pre><code lang="CSS">
section#videolist li {
	position:relative;
}
section#videolist li p {
	display:none;
	position:absolute;
	bottom:-100px;
	left:0;
}
section#videolist li video:focus+p {
	display:block;
}
</code></pre>
<p>The sibling selector (+) is telling the browser to display the paragraph as block when its video brother has focus. This is a rough test. There could be some accessibility issues and I&#8217;ll need to test this out. Obviously this will not work in Internet Explorer. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/css3-sibling-with-video-tag/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>YUI 3.0 Gallery now includes modernizr functionality</title>
		<link>http://www.last-child.com/yui-3-0-modernizr-function/</link>
		<comments>http://www.last-child.com/yui-3-0-modernizr-function/#comments</comments>
		<pubDate>Tue, 25 May 2010 22:51:14 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[YUI]]></category>
		<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[Modernizr]]></category>
		<category><![CDATA[Yahoo! UI Library]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=229</guid>
		<description><![CDATA[Are you working on an HTML5 project and using the latest YUI library from Yahoo? If so, you&#8217;ll be happy to know that you can use the modernizr functionality within the YUI3 code. This extension was added to the YUI Gallery by Pradhap Natarajan: Modernizr (gallery-modernizr). This is a wrapper for Modernizr library that is [...]]]></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 (YUI)" /></a>Are you working on an <a class="zem_slink" href="http://en.wikipedia.org/wiki/HTML5" title="HTML5" rel="wikipedia">HTML5</a> project and using the latest <a class="zem_slink" href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library" rel="homepage">YUI library</a> from <a class="zem_slink" href="http://www.yahoo.com" title="Yahoo!" rel="homepage">Yahoo</a>? If so, you&#8217;ll be happy to know that you can use the <a href="http://www.modernizr.com/docs/">modernizr</a> functionality within the YUI3 code.</p>
<p>This extension was added to the YUI Gallery  by Pradhap Natarajan: <a href="http://yuilibrary.com/gallery/show/modernizr">Modernizr (gallery-modernizr)</a>. </p>
<blockquote cite="http://yuilibrary.com/gallery/show/modernizr">
<p>This is a wrapper for <a class="zem_slink" href="http://www.modernizr.com/" title="Modernizr" rel="homepage">Modernizr</a> library that is used to detect support for many HTML5 &amp; CSS3 features on a browser. More documentation here &#8211; <a href="http://www.modernizr.com/docs/">http://www.modernizr.com/docs/</a> Please note that the module does not add the Modernizr object to the global namespace. Instead it will be local to the YUI instance.</p>
<p><cite><a href="http://yuilibrary.com/gallery/show/modernizr">Modernizr </a> YUI Library</cite>
</p></blockquote>
<p>Modernizr was created to make HTML5 development consistent. It gives hooks for JS and CSS to support the advanced features.</p>
<h3>Related articles by Zemanta</h3>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.slideshare.net/drprolix/yui3-3812758">YUI 3</a> (slideshare.net)</li>
<li class="zemanta-article-ul-li"><a href="http://www.last-child.com/html5-resource-html5-doctor/">HTML5 Resource: HTML5 Doctor</a> (last-child.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.slideshare.net/rmsguhan/yu-open-forall">YUI open for all !</a> (slideshare.net)</li>
<li class="zemanta-article-ul-li"><a href="http://developer.yahoo.net/blog/archives/2010/03/tech_thursday_smileys_seeing_dogs_and_cameras_yui_modules_videos_and_server_side_javascript.html">Tech Thursday &#8211; Smileys, seeing dogs and cameras, YUI modules, videos and server side JavaScript</a> (developer.yahoo.net)</li>
<li class="zemanta-article-ul-li"><a href="http://developer.yahoo.net/blog/archives/2010/05/look_around_you_fun_with_geolocation_and_wikipedia.html">Look around you &#8211; fun with geolocation and Wikipedia</a> (developer.yahoo.net)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/yui-3-0-modernizr-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dive into HTML5 should be everyone&#8217;s intro to the standard</title>
		<link>http://www.last-child.com/dive-into-html5/</link>
		<comments>http://www.last-child.com/dive-into-html5/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 22:30:50 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Online Resource]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[FAQs Help and Tutorials]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Markup Languages]]></category>

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

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

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

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

		<guid isPermaLink="false">http://www.last-child.com/?p=163</guid>
		<description><![CDATA[The Yahoo! Developer Network blog just published an article I wrote about Yahoo! BOSS. It discusses how to use the search filters and query attributes with the BOSS API. I&#8217;ve used these methods on V3GGIE.com, a vegetarian search engine and will be launching a new niche search engine in the next few weeks. Update I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://developer.yahoo.net/blog/">Yahoo! Developer Network blog</a> just published an article I wrote about <a href="http://developer.yahoo.com/search/boss/">Yahoo! BOSS</a>. It discusses <a href="http://developer.yahoo.net/blog/archives/2008/10/boss_niche_search.html">how to use the search filters and query attributes with the BOSS API</a>. </p>
<p>I&#8217;ve used these methods on <a href="http://v3ggie.com">V3GGIE.com</a>, a vegetarian search engine and will be launching a new niche search engine in the next few weeks.<br />
<a href="http://developer.yahoo.com/search/boss/"><img src="http://l.yimg.com/a/i/ydn/boss/boss_info5.gif" alt="Yahoo! BOSS plus your ideas make a unique search experience" /></a></p>
<h3>Update</h3>
<p><a href="http://www.flickr.com/photos/draket/3204932940/" title="Insider Food badge for featured experts by Ted Drake, on Flickr"><img src="http://farm4.static.flickr.com/3530/3204932940_854e6703fc_o.png" width="300" height="150" alt="Insider Food badge for featured experts" /></a>I&#8217;ve just taken the covers off my latest search engine project. <a href="http://insiderfood.com">Insider Food</a> is a <a href="http://sfbay.insiderfood.com">regional search engine</a> powered by local bloggers, chefs, and <a href="http://ny.insiderfood.com/resource.php?resource=restaurantgirl.com">restaurant fanatics</a>. </p>
<p>It&#8217;s a wee bit slow right now due to a multitude of API requests to Yahoo! Boss, <a href="http://pipes.yahoo.com">Yahoo! Pipes</a>, Flickr, Amazon, and more. Look for some upcoming posts about the construction of the site. Hopefully I can even describe caching and threading. Once somebody teaches me <img src='http://www.last-child.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<h3>Related articles by Zemanta</h3>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.techmeme.com/081028/p103">Introducing Y!OS 1.0 &#8211; live today! (Yahoo! Developer Network Blog)</a></li>
<li class="zemanta-article-ul-li"><a href="http://blog.semantic-web.at/2008/07/15/unlimited-queries-with-yahoo-search-boss/">Unlimited Queries with Yahoo! Search BOSS</a></li>
<li class="zemanta-article-ul-li"><a href="http://www.last-child.com/yahoo-search-monkey-in-paris/">Yahoo Search Monkey in Paris</a></li>
<li class="zemanta-article-ul-li"><a href="http://jeremy.zawodny.com/blog/archives/010425.html">Congrats to Yahoo! on the BOSS Launch</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/niche-search-engine-yahoo-boss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 Attribute Selector Presentation</title>
		<link>http://www.last-child.com/css3-attribute-selectors/</link>
		<comments>http://www.last-child.com/css3-attribute-selectors/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 20:46:11 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[attribute selector]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Presentation]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=162</guid>
		<description><![CDATA[During the fog of a summer cold and pressing deadlines&#8230; I gave a presentation today at the Yahoo! Front End Engineering Summit about CSS3 Attribute Selectors. The presentation briefly touched on some of my previous posts on this site as well as a few new concepts and ideas. Here is the full presentation (HTML): CSS3 [...]]]></description>
			<content:encoded><![CDATA[<p>During the fog of a summer cold and pressing deadlines&#8230; I gave a presentation today at the <a href="http://www.flickr.com/photos/tags/f2esummit08/">Yahoo! Front End Engineering Summit</a> about CSS3 Attribute Selectors. The presentation briefly touched on some of my previous posts on this site as well as a few new concepts and ideas.</p>
<p>Here is the full presentation (HTML): <a href="http://www.last-child.com/presentations/attributes/">CSS3 Attribute Lovin&#8217;</a>. Feel free to copy, share, or do whatever you like with it.  </p>
<p>I&#8217;ll post some more information on the new topics soon. Right now I&#8217;ve got to get back to my massive list of outstanding bugs on my project.<br />
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.list-your-blog.com/yahoo-launches-web-analytics/">Yahoo Launches Web Analytics</a></li>
<li class="zemanta-article-ul-li"><a href="http://blog.searchenginewatch.com/blog/081009-082420">Yahoo Rebrands IndexTools as Web Analytics; Launches Limited Release</a></li>
<li class="zemanta-article-ul-li"><a href="http://ajaxian.com/archives/yahoo-releases-new-performance-best-practices">Yahoo! releases new performance best practices</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/css3-attribute-selectors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add Pagination to your Yahoo! BOSS search engine</title>
		<link>http://www.last-child.com/pagination-boss-search-engine/</link>
		<comments>http://www.last-child.com/pagination-boss-search-engine/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 15:07:52 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Unordered List]]></category>
		<category><![CDATA[YUI]]></category>
		<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[Application programming interface]]></category>
		<category><![CDATA[Cross Site Scripting]]></category>
		<category><![CDATA[Design pattern]]></category>
		<category><![CDATA[Web search engine]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=161</guid>
		<description><![CDATA[Yahoo&#8217;s BOSS search API makes it easy for you to create a customized search engine. Yahoo! also has a Design Pattern lLibrary to save time designing your pages. They&#8217;ve put a lot of effort into creating the best user experience for search pagination. Pagination guidelines Here&#8217;s a sample of the Design Library&#8217;s ideas for search [...]]]></description>
			<content:encoded><![CDATA[<p>
<a href="http://developer.yahoo.com/ypatterns/pattern.php?pattern=searchpagination"><img src="http://developer.yahoo.com/ypatterns/images/ysearch-page7.png" alt="Search pagination example"></a><a href="http://developer.yahoo.com/search/boss">Yahoo&#8217;s BOSS search API</a> makes it easy for you to create a customized search engine. Yahoo! also has a <a href="http://developer.yahoo.com/ypatterns/index.php">Design Pattern lLibrary</a> to save time designing your pages. They&#8217;ve put a lot of effort into creating the best user experience for <a href="http://developer.yahoo.com/ypatterns/pattern.php?pattern=searchpagination">search pagination</a>. </p>
<h3>Pagination guidelines</h3>
<p>Here&#8217;s a sample of the Design Library&#8217;s ideas for search pagination.</p>
<blockquote cite="http://developer.yahoo.com/ypatterns/pattern.php?pattern=searchpagination">
<ul>
<li>Display the navigation controls as a row of links.</li>
<li>Present links in the following order: &#8216;Prev&#8217;, page links, &#8216;Next&#8217;.</li>
<li>Display a left arrow after the label &#8216;Prev&#8217;.</li>
<li>Display a right arrow before the label &#8216;Next&#8217;.</li>
<li>Make the arrow(s) clickable.</li>
<li>The page links should contain a maximum set of 10 page links. If fewer pages of results exist, only show page links for the available pages.</li>
<li>When on pages 1-6, the page links should always start at &#8217;1&#8242;.</li>
</ul>
<p><cite><a href="http://developer.yahoo.com/ypatterns/pattern.php?pattern=searchpagination">Search Pagination</a></cite>
</p></blockquote>
<p>The rationale for these rules is also interesting: </p>
<blockquote>
<ul>
<li>Displaying arrow graphics helps differentiate the links and provides larger click targets.</li>
<li>Disabled controls add little value in this context since
<ul>
<li>These links often appear blow the fold.</li>
<li>The first page of results makes up the vast majority of pageviews. Displaying a disabled &#8220;previous&#8221; control on all of these is of little added value.</li>
<li>Although a &#8220;First&#8221; link has value, it competes with the functionality presented in the random-access links. </li>
<li>The &#8220;Last&#8221; link is of little value as the results are sorted by relevance.  This is is also problematic since the total number of results (and therefore, the last result) may not be known. </li>
</ul>
</li>
</ul>
</blockquote>
<h3>Add this pagination style to your search engine</h3>
<p>See the final result on <a href="http://v3ggie.com/">V3GGIE.com</a>: <a href="http://v3ggie.com/recipes/vegetarian+enchiladas.html">Vegetarian Enchiladas Recipes</a></p>
<p>Most <a href="http://php.net/" title="PHP" rel="homepage" class="zem_slink">PHP</a> pagination tutorials assume you are pulling content from a database. <a href="http://ascaniocolonna.com/en/">Ascanio Colonna</a> created a <a href="http://blog.ascaniocolonna.com/?p=12">good tutorial on building pagination</a> with PHP that is agnostic to the data source. I&#8217;ve taken his code and modified it to match the Yahoo Design Pattern. I&#8217;ve also added the suggested <a href="http://developer.yahoo.com/yui/container/module/index.html">YUI Module markup</a> to stay consistent with the <a href="http://developer.yahoo.com/yui/grids/">YUI Grids</a> and any future YUI javascript.</p>
<p>
The pagination.php file includes a function that creates the module. You&#8217;ll need to call this function from your results page with a series of parameters. These are easy to populate from the BOSS interface. It&#8217;s worth noting that I am ignoring the BOSS next/last page nodes in the web service and prefer to build my own urls.</p>
<h3>The Pagination Code</h3>
<p>
Lets&#8217; start by looking at the code inside your results.php file. This will call the pagination function and pass the desired parameters.</p>
<p><code lang="PHP"><br />
if(!empty($searchQuery))<br />
  {<br />
	require '/include/pagination.php';<br />
  if(isset($_REQUEST['page'])) {<br />
	$page = $_REQUEST['page'];<br />
	} else  {<br />
	$page = '1';<br />
	}<br />
	$limit = $count;<br />
	$targetpage = 'results.php';<br />
	$pagestring = '?page=';<br />
	$summary_name = 'articles';<br />
	$placement = 'summary';<br />
	// start pagination<br />
	  echo getPaginationString($page, $totalhits, $limit,  $targetpage, $pagestring, $summary_name, $placement);<br />
 }<br />
</code></p>
<h4>Here&#8217;s what you are working with:</h4>
<dl>
<dt> require &#8216;/include/pagination.php&#8217;</dt>
<dd>Where does the pagination file sit on your server</dd>
<dt>$page logic</dt>
<dd>First look to see if there is page=x in the url. If so, $page = x, if not, you are on page 1.</dd>
<dt>$limit</dt>
<dd>How many results will appear on the page</dd>
<dt>$targetpage</dt>
<dd>what is the name of your results page? index.php, results.php?</dd>
<dt>$pagestring</dt>
<dd>I tried to minimize this to ?p= but couldn&#8217;t track down why it didn&#8217;t work. I&#8217;ve left it at the default ?page=&#8230;</dd>
<dt>$summary_name</dt>
<dd>This is what appears in the text &#8220;xxx (summary_name) results. This is not used in the Yahoo Design Library</dd>
<dt>$placement</dt>
<dd>You&#8217;ll probably want to use summary. This function also allows &#8220;footer&#8221; for a simplified output</dd>
<dt>echo getPaginationString(&#8230;)</dt>
<dd>Send the information to the function and display the results in the page.</dd>
</dl>
<hr />
<h3>Important Update!</h3>
<p>The original code I posted had a serious security flaw. You should never output user&#8217;s input directly into your page. I had something like this href=&#8221;?query=$_REQUEST['query']&#8220;. This allows all sorts of <a href="http://en.wikipedia.org/wiki/Cross-site_scripting" title="Cross-site scripting" rel="wikipedia" class="zem_slink">Cross Site Scripting</a> attacks. You must urlencode any text that comes from a user. This is safe: urlencode($_REQUEST['query']).</p>
<p>I apologize if anyone has used this code, as I wrote it on their site. They should immediately update the logic. -Ted</p>
<hr />
<h3>The pagination function</h3>
<p>
I have streamlined the original code from Asconio, as he was tying into pre-existing facebook styles. This code is for your unique web site. It&#8217;s also worth noting I use rewrite rules to make my search result page urls more friendly, i.e. /corn.html instead of /result.php?q=corn</p>
<p><code lang="PHP"><br />
<?php </p>
<p>//text strings in strings.php</p>
<p>function getPaginationString($page = 1, $totalitems, $limit = 15, $targetpage = '/', $pagestring = '?page=', $summary_name = 'items', $placement = 'summary',$safeQuery)<br />
{</p>
<p>$countnum = '15';</p>
<p>	// inurl or intitle<br />
	// it should only be three digits long, int, inu, or nox anything else could be a vulnerability<br />
	//int=intitle, inu=inurl, nox=no setting<br />
	if (isset($_REQUEST['inx']) &#038;&#038; strlen($_REQUEST['inx']) == 3){<br />
	$inxv = $_REQUEST['inx'];<br />
	}<br />
	else {<br />
	$inxv = '';<br />
	}</p>
<p>	// type of query<br />
	// request type should only be 2 chars, if not we are dealing with an xss attack<br />
	// type options: rc, lo, ve... these represent recipes, local, buzz for insider sites.<br />
	if (!empty($_REQUEST['t']) &#038;&#038; strlen($_REQUEST['t']) <= 2) {<br />
		$tid = $_REQUEST['t'];<br />
	}<br />
	else{<br />
	$tid = 've';}<br />
// count should only be a number. don't allow text for xss protection<br />
if (!empty($_REQUEST['count'])) {<br />
	$countnum = number($_REQUEST['count']);<br />
	$limit = $countnum;<br />
}<br />
	// DEFAULTS<br />
	$adjacents = 10;<br />
	//$targetpage = .'.html';<br />
	// VARS<br />
	if(substr($pagestring, 0, 1) != '?') $pagestring = '?' . $pagestring; // If query string is lacking start, add it<br />
	if(substr($pagestring, strlen($pagestring) - 5) != 'page=') $pagestring .= '&#038;page='; // If query string is lacking page var, add it<br />
	$prev = $page - 1;<br />
	$next = $page + 1;<br />
	$firstpage = 1;<br />
	$lastpage = ceil($totalitems / $limit);<br />
	$fiop = ($limit * $page) - $limit + 1; //# of first item displayed in current page<br />
	$liop = min($limit * $page, $totalitems); //# of last item displayed in current page<br />
	$searchstring = "&amp;t=$tid&amp;inx=$inxv";<br />
	$nicetotal = number_format($totalitems);</p>
<p>	/*<br />
		DRAW PAGINATOR<br />
	*/</p>
<p>	// Give it the right class (the footer paginator has no summary and the current page has a different gfx)<br />
	if($placement == 'summary')<br />
		$type = 'summary';<br />
	else<br />
		$type = 'footer';</p>
<p>	// Draw summary<br />
	if($placement == 'summary')<br />
		$pagination .= "
<div class=\"summary hd\">
<h4>$string_results_page</h4>
</div>
<p>";</p>
<p>	if($lastpage > 1) // Paginator page selection is drawn only if more than 1 pages are there<br />
	{	</p>
<p>		$pagination .= '
<div class="bd">
<ul>';</p>
<p>		// First page selector<br />
		if ($page > 2) </p>
<p>		// Previous page selector<br />
		if ($page > 1)<br />
			$pagination .= "
<li class=\"prevlink\"><a href=\"$safeQuery.html$pagestring$prev$searchstring\">$string_next</a></li>
<p>";	</p>
<p>		// Page selectors<br />
		if ($page < 4)	//not enough pages to bother<br />
		{<br />
			for ($counter = 1; $counter <= min(5, $lastpage); $counter++)<br />
			{<br />
				if ($counter == $page)<br />
					$pagination .= "
<li class=\"current\"><strong>$counter</strong></li>
<p>";<br />
				else<br />
					$pagination .= "
<li><a href=\"$safeQuery.html$pagestring$counter$searchstring\">$counter</a></li>
<p>";<br />
			}<br />
		}<br />
		elseif ($page > $lastpage - 3)<br />
		{<br />
			for($counter = $lastpage - min(5, $lastpage); $counter <= $lastpage; $counter++)<br />
			{<br />
				if ($counter == $page)<br />
					$pagination .= "
<li class=\"current\"><strong>$counter</strong></li>
<p>";<br />
				else<br />
					$pagination .= "
<li><a href=\"$safeQuery.html$pagestring$counter$searchstring\">$counter</a></li>
<p>";<br />
			}<br />
		}<br />
		else<br />
		{<br />
			for($counter = $page - 2; $counter <= $page + 2; $counter++)<br />
			{<br />
				if ($counter == $page)<br />
					$pagination .= "
<li class=\"current\"><strong>$counter</strong></li>
<p>";<br />
				else<br />
					$pagination .= "
<li><a href=\"$safeQuery.html$pagestring$counter$searchstring\">$counter</a></li>
<p>";<br />
			}<br />
		}</p>
<p>		//next button<br />
		if ($page < $lastpage)<br />
			$pagination .= "
<li class=\"nextlink\"><a href=\"$safeQuery.html$pagestring$next$searchstring\">$string_next</a></li>
<p>";</p>
<p>		//last button<br />
		if ($page < $lastpage - 1) </p>
<p>		$pagination .= '</ul>
</div>
<p>';<br />
	}</p>
<p>	$pagination = "
<div class=\"pagelinks \">$pagination</div>
<p>";</p>
<p>	return $pagination;</p>
<p>} ?></p>
<p><?php</p>
<p>//This allows user to easily try the search with different options</p>
<p>// strings are translated defined in separate file for localization<br />
//$string_try_diff_type   = "Try a different type of search";<br />
//$string_try_diff_header = "Didn't find what you were looking for?";<br />
//$string_try_inx         = "Try searching for $safeQuery only in page titles";</p>
<p>function trySomethingelse($safeQuery, $searchQuery, $inx, $tid,$string_try_diff_header, $string_try_diff_type, $string_try_inx, $string_buzz_tab, $string_local_tab,$string_recipes_tab){<br />
if($inx==''){<br />
$tryinx = "
<li><a href=\"/$safeQuery.html?inx=int\">$string_try_inx</a>";<br />
}<br />
$trydiff='';<br />
switch ($tid){<br />
case "rc":<br />
$trydiff = "</p>
<li>$string_try_diff_type <a href=\"/$safeQuery.html?t=lo\">$string_local_tab</a> or<br />
<a href=\"/$safeQuery.html?t=ve\">$string_buzz_tab</a>";<br />
break;<br />
case "lo":<br />
$trydiff = "</p>
<li>$string_try_diff_type <a href=\"/$safeQuery.html?t=rc\">$string_recipes_tab</a> or<br />
<a href=\"/$safeQuery.html?t=ve\">$string_buzz_tab</a>";<br />
break;<br />
default:<br />
$trydiff = "</p>
<li>$string_try_diff_type <a href=\"/$safeQuery.html?t=rc\">$string_recipes_tab</a> or<br />
<a href=\"/$safeQuery.html?t=lo\">$string_local_tab</a>";<br />
}</p>
<p>?></p>
<div class="different mod">
<div class="hd"><?php print $string_try_diff_header ;?></div>
<div class="bd">
<ul>
<?php<br />
print 	$tryinx;<br />
print  	$trydiff;<br />
?></p>
</ul>
</div>
</div>
<p><?php<br />
}<br />
?></p>
<p></code></p>
<p>
I&#8217;ve added a few classes to the final output. The previous and next links have class&#8221;nextlink&#8221; or class=&#8221;prevlink&#8221;. The current page has the number within a strong tag with class=&#8221;current&#8221;. Finally, the parent module has class=&#8221;pagelinks mod&#8221;. This makes it pretty simple to style</p>
<h4>Pagination CSS</h4>
<p>I&#8217;m using the YUI Sam Skin sprite for the tabbed search box. I&#8217;ve added a couple arrows to this sprite for my search pagination. </p>
<p><code lang="CSS"><br />
.pagelinks {<br />
text-align:center;<br />
border:1px solid #ccc;<br />
padding:5px 0 0 0;<br />
}<br />
.pagelinks ul li {<br />
display:inline;<br />
}<br />
.pagelinks ul a, .pagelinks ul strong {<br />
display;block; padding:3px 5px;<br />
}<br />
.pagelinks ul strong {<br />
background-color:green; color:#fff;<br />
}<br />
.pagelinks li.nextlink a,.pagelinks li.prevlink a  {<br />
padding-right:15px; font-size:120%; font-wieght:bold; background:url(/images/sprite.png) no-repeat 100% -1943px;<br />
}<br />
.pagelinks li.prevlink a {<br />
padding-right:0px; padding-left:15px; background-position:0 -1973px;<br />
}<br />
</code></p>
<p>
I am also not a PHP expert and welcome suggestions on improving the code.</p>
<h3>Download files</h3>
<ul>
<li><a href="http://www.last-child.com/pagination.txt">Pagination functionality for a BOSS site (.txt)</a> &#8211; the php code and sample to insert the pagination.</li>
</ul>
<h3>Related articles by Zemanta</h3>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://chris.pirillo.com/2008/09/11/are-you-tired-of-the-same-old-search-engine/">Are You Tired of the Same Old Search Engine?</a></li>
<li class="zemanta-article-ul-li"><a href="http://lifehacker.com/5046701/buildasearch-combines-multiple-site-seaches-into-one-box">Buildasearch Combines Multiple Site Seaches into One Box [Search]</a></li>
<li class="zemanta-article-ul-li"><a href="http://www.last-child.com/create-search-yahoo-boss/">Create your own Search Engine with Yahoo! BOSS</a></li>
<li class="zemanta-article-ul-li"><a href="http://blog.programmableweb.com/2008/09/11/5-best-practices-for-mashups/">5 Best Practices for Mashups</a></li>
<li class="zemanta-article-ul-li"><a href="http://blog.programmableweb.com/2008/09/11/5-best-practices-for-mashups/">5 Best Practices for Mashups</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/pagination-boss-search-engine/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Create a tabbed search form with YUI</title>
		<link>http://www.last-child.com/tabbed-search-form-yui/</link>
		<comments>http://www.last-child.com/tabbed-search-form-yui/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 14:00:59 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Form]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[Online Resource]]></category>
		<category><![CDATA[YUI]]></category>
		<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=159</guid>
		<description><![CDATA[Yahoo! makes it easy to create an accessible, handsome tabbed interface. I used their Tab View library to create the tabbed search form for V3GGIE.com. While Tab View can create the tabbed content dynamically, I&#8217;m using it to hide/show hard-coded individual forms. Update: I&#8217;ve removed the tabbed interface from V3GGIE.com. This particular use of the [...]]]></description>
			<content:encoded><![CDATA[<p>Yahoo! makes it easy to create an accessible, handsome tabbed interface. I used their Tab View library to create the tabbed search form for <a href="http://v3ggie.com">V3GGIE.com</a>. While Tab View can create the tabbed content dynamically, I&#8217;m using it to hide/show hard-coded individual forms.</p>
<p><ins datetime="2008-09-28T16:10:07+00:00"><strong>Update:</strong> I&#8217;ve removed the tabbed interface from V3GGIE.com. This particular use of the tabbed module seemed to have created some confusion in users. The approach is still valid, just not the way I originally implemented it.</ins><a href="http://v3ggie.com"><img src="http://www.last-child.com/wp-content/uploads/2008/09/v3ggie-form-300x45.png" alt="" class="alignnone size-medium wp-image-160" height="45" width="300"> See the tabbed search form on V3GGIE.com </a></p>
<h3>Step 1. Create the basic HTML code.</h3>
<p>The tabbed code is a simple pattern: </p>
<ol>
<li>Start with a parent div and give it an id and class=&#8221;yui-navset&#8221;.<br />
	  <code lang="HTML">
<div class="yui-g yui-navset" id="v3search"></div>
</li>
<p></code></p>
<li>Create an unordered list inside this div with class=&#8221;yui-nav&#8221;.</li>
<li>Each list includes a deep link to a corresponding div that is also a child of the parent div. The link text in an em tag.<br />
	  <code lang="HTML">
<li><a href="#vesearch"><em>V3GGIE Search</em></a></li>
<p></code></li>
<li>Create a div with class=&#8221;yui-content&#8221; and create a set of content containing divs. Each div has an id.<br />
	  <code lang="HTML"></p>
<div class="yui-content">
<div id="vesearch">...</div>
<div id="losearch">...</div>
<div id="rcsearch">...</div>
</p></div>
<p></code>
	</li>
<li>Insert the Tabview CSS at the top of the page, the Tab View JS at the bottom of the page, create a small js that instantiates the tab-view module.</li>
<li>For easier styling, use the sam_skin CSS package and add class=&#8221;yui-skin-sam&#8221; to the body.</li>
</ol>
<h3>Step 2. Use PHP to make it more interesting</h3>
<p>Each page calls this chunk of code to insert the tabbed form, it also sets a variable ($selected),  determining which tab is selected on page load. I&#8217;m also inserting the last search query into the text input to make it easier on the user. This is easily done by grabbing the query from the Request object. </p>
<p>The finished code: </p>
<p>	<code lang="PHP"></p>
<div class="yui-g yui-navset" id="v3search">
<!--<?php print $selected ;?>--></p>
<ul class="yui-nav">
<li> &gt;<a href="#vesearch"><em>V3GGIE Search</em></a></li>
<li> &gt;<a href="#losearch"><em>Local</em></a></li>
<li> &gt;<a href="#rcsearch"><em>Recipes</em></a></li>
<li> &gt;<a href="#nesearch"><em>News</em></a></li>
<li> &gt;<a href="#blsearch"><em>Blogs</em></a></li>
</ul>
<div class="yui-content">
<div id="vesearch">
<form name="b" action="/results.php" method="get">
   <label for="vquery">Search for Vegetarian information</p>
<input id="vquery" size="50" name="query" value="&lt;?php print $inputtext; ?&gt;" type="text"></label></p>
<input class="searchsubmit" value="Search" type="submit">
   </form>
</p></div>
<div id="losearch">
<form name="b" action="/local/results.php" method="get">
   <label for="lquery">Where do you want to eat?</p>
<input size="50" id="lquery" name="query" value="&lt;?php print $inputtext; ?&gt;" type="text"></label></p>
<input class="searchsubmit" value="Search" type="submit">
<p>Try "San Francisco Pho", "Paris Fromage",  or "92104 tofu"</p>
</p></form>
</p></div>
<div id="rcsearch">
<form name="b" action="/recipes/results.php" method="get">
   <label for="rquery">What are you hungry for?</p>
<input size="50" name="query" id="rquery" value="&lt;?php print $inputtext; ?&gt;" type="text"></label></p>
<input class="searchsubmit" value="Search" type="submit">
<p>Try "corn chowder" or "vegan pizza"</p>
</p></form>
</p></div>
<div id="nesearch">
<form name="b" action="/news/results.php" method="get">
   <label for="nquery">Get Vegetarian news?</p>
<input size="50" id="nquery" name="query" value="&lt;?php print $inputtext; ?&gt;" type="text"></label></p>
<input class="searchsubmit" value="Search" type="submit">
<p>Try "Vegetarian Chinese Olympics"</p>
</p></form>
</p></div>
<div id="blsearch">
<form name="b" action="/blogs/results.php" method="get">
   <label for="bquery">What are the blogs saying?</p>
<input size="50" id="bquery" name="query" value="&lt;?php print $inputtext; ?&gt;" type="text"></label></p>
<input class="searchsubmit" value="Search" type="submit">
<p> Try a subject: "PETA", "Tempeh", or "Paris -Hilton Vegetarian"</p>
</p></form>
</p></div>
</p></div>
</p></div>
<p></code></p>
<p><a href="http://v3ggie.com/search-form.txt">View the source as a text file</a></p>
<h3>The Final Product</h3>
<p>We now have a tabbed module that allows the user to find recipes, news, blogs, and local restaurants from any page. This is an easy introduction to the <a href="http://developer.yahoo.com/YUI/">YUI</a> libraries. However,  I came across the following surprises:</p>
<ul>
<li>The order of the tabs must match the order of the target divs. I moved my tabs around and discovered they were toggling the wrong forms.</li>
<li>The links that generate the tabs need to have em tags surrounding the text</li>
<li>You&#8217;ll need to download the entire <a href="http://sourceforge.net/project/downloading.php?group_id=165715&amp;filename=yui_2.5.2.zip">YUI package</a> to gain access to the CSS and sprites needed for the library. The examples on the YUI site assume relative links to files, you will either need to duplicate that file structure or upload the skin&#8217;s sprite and change the CSS accordingly. </li>
</ul>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://woork.blogspot.com/2008/07/navigation-bar-with-tabs-using-css.html">Navigation bar with tabs using CSS and sliding doors effect</a></li>
<li class="zemanta-article-ul-li"><a href="http://ajaxian.com/archives/filament-groups-accessible-extensions">Filament Group&#8217;s Accessible Extensions</a></li>
<li class="zemanta-article-ul-li"><a href="http://www.stylegala.com/news/public200809/4777.htm">jQuery Nested Menu</a></li>
<li class="zemanta-article-ul-li"><a href="http://ajaxian.com/archives/the-lessons-of-css-frameworks">The lessons of CSS frameworks</a></li>
<li class="zemanta-article-ul-li"><a href="http://ajaxian.com/archives/rounded-tabs-with-dijit">Rounded tabs with Dijit</a></li>
<li class="zemanta-article-ul-li"><a href="http://jtame05.wordpress.com/2008/06/16/dynamic-css-yet-another-follow-up/">Dynamic CSS (Yet another follow up)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/tabbed-search-form-yui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
