<?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>willoller.com &#187; html</title>
	<atom:link href="http://www.willoller.com/category/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.willoller.com</link>
	<description>Learning to match the beat of the Old World man.</description>
	<lastBuildDate>Thu, 02 Feb 2012 23:34:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Ordinal Suffixes in PHP</title>
		<link>http://www.willoller.com/ordinal-suffixes-in-php/</link>
		<comments>http://www.willoller.com/ordinal-suffixes-in-php/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 21:23:55 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.willoller.com/?p=246</guid>
		<description><![CDATA[function ordinalize&#40;$int&#41; &#123; &#160; &#160;//sanity &#160; &#160;$int = &#40;int&#41;$int; &#160; &#160;if&#40;!is_numeric&#40;$int&#41;&#41; return false; &#160; &#160;// You could internationalize here &#160; &#160;$suffixes = array&#40;'th', 'st', 'nd', 'rd'&#41;; &#160; &#160;// Get the number in the tens place &#160; &#160;$tens = substr&#40;$int,-2,1&#41;; &#160; &#160;// All of the numbers 10-19 return 'th' &#160; &#160;if&#40;$tens == 1&#41; return $int.$suffixes&#91;0&#93;; &#160; [...]]]></description>
			<content:encoded><![CDATA[	<div class="code php" style="font-family: monospace;"><br />
<span style="color: #000000; font-weight: bold;">function</span> ordinalize<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$int</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #808080; font-style: italic;">//sanity</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">$int</span> = <span style="color: #66cc66;">&#40;</span>int<span style="color: #66cc66;">&#41;</span><span style="color: #0000ff;">$int</span>;<br />
&nbsp; &nbsp;<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>!<a href="http://www.php.net/is_numeric"><span style="color: #000066;">is_numeric</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$int</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span>;<br />
<br />
&nbsp; &nbsp;<span style="color: #808080; font-style: italic;">// You could internationalize here</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">$suffixes</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'th'</span>, <span style="color: #ff0000;">'st'</span>, <span style="color: #ff0000;">'nd'</span>, <span style="color: #ff0000;">'rd'</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
&nbsp; &nbsp;<span style="color: #808080; font-style: italic;">// Get the number in the tens place</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">$tens</span> = <a href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$int</span>,<span style="color: #cc66cc;">-2</span>,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
&nbsp; &nbsp;<span style="color: #808080; font-style: italic;">// All of the numbers 10-19 return 'th'</span><br />
&nbsp; &nbsp;<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$tens</span> == <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$int</span>.<span style="color: #0000ff;">$suffixes</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>;<br />
<br />
&nbsp; &nbsp;<span style="color: #808080; font-style: italic;">// Get the number in the ones place</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">$cardinal</span> = <a href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$int</span>,<span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
&nbsp; &nbsp;<span style="color: #808080; font-style: italic;">// All numbers ending in 1, 2, 3 have special suffixes</span><br />
&nbsp; &nbsp;<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$suffixes</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$cardinal</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$int</span>.<span style="color: #0000ff;">$suffixes</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$cardinal</span><span style="color: #66cc66;">&#93;</span>;<br />
<br />
&nbsp; &nbsp;<span style="color: #808080; font-style: italic;">// All remaining numbers end in 'th'</span><br />
&nbsp; &nbsp;<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$int</span>.<span style="color: #0000ff;">$suffixes</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>;<br />
<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
&nbsp;</div>

 ]]></content:encoded>
			<wfw:commentRss>http://www.willoller.com/ordinal-suffixes-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>X-UA-Bloated</title>
		<link>http://www.willoller.com/x-ua-bloated/</link>
		<comments>http://www.willoller.com/x-ua-bloated/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 21:37:46 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://www.willoller.com/x-ua-bloated/</guid>
		<description><![CDATA[The problems with the new solution are many. The ones that concern me: After just a few versions, the browser will be hopelessly bloated and bogged down trying to maintain several versions with all of their features and bugs The point of the solution is to make browser bugs immortal. But will there be bugs [...]]]></description>
			<content:encoded><![CDATA[	<p>The problems with the new solution are many.  The ones that concern me:<br />
<ul><br />
<li>After just a few versions, the browser will be hopelessly bloated and bogged down trying to maintain several versions with all of their features and bugs</li></p>
	<p><li>The point of the solution is to make browser bugs immortal.  But will there be bugs in the bugs?  Will the peekaboo bug or hasPosition act differently on the embedded IE6 from the original IE6? My head hurts just thinking about it.</li></p>
        <li>Like it or not, web design is a craft.  The building industry doesn&#8217;t give special exceptions to architects who want to build a skyscraper out of wood just because they&#8217;ve always built birdhouses and wrap-around decks.  Instead, they tell the architects to learn about steel and concrete and glass or find a new industry.</li>
	<p></ul></p>
	<p>Those issues aside, maybe <a href="http://alistapart.com/articles/fromswitchestotargets">version targeting is not all bad</a>  (God help me, but I trust that Eric Meyer).  But I agree with <a href="http://unstoppablerobotninja.com/journal/entry/527/">Ethan Marcotte</a> that the solution is elsewhere; and by elsewhere i mean right here.</p>
	<p>It&#8217;s not complicated. The flaming will die down. The Web will be saved. Our job &#8211; our <em>craft</em> will get a little easier and a little better.</p>
<h2>The Solution</h2>
	<p>Microsoft should release <strong>stand-alone downloadable versions of Internet Explorer</strong>. </p>
	<p>It should also give IE7-8-9-10 the ability to &#8220;nest&#8221; browsers in the parent browser window, just like <a href="https://addons.mozilla.org/en-US/firefox/addon/1419">Firefox already has</a>.  Sure, the <code>&lt;meta http-equiv="X-UA-Compatible" /&gt;</code> tag could still be used to automatically specify the IE version, and the user could be asked if they want to view the file in the pre-selected X-UA-Compatible version or in the current (IE8-9-10) version they have now.  Then, if the version is not installed, they could choose to install it or go ahead and view it in some other installed version.</p>
	<p>IE7 has a plugin architecture; IE8 should too. The only thing missing is the standalone IE releases (<a href="http://tredosoft.com/Multiple_IE">MultiIE</a> already does it for XP, but it fails horribly in Vista).</p>
	<p>I think this gives all of us the best of all worlds:  Corporations who <em>need</em> a certain version of IE for their intranet <em>will have it</em>.  Users who want cutting-edge compatibility and speed <em>will have it</em>.  Developers who need a solution for future-broken sites under IE11 <em>will have it</em>.  Standardistas who need those versions to browser-test for backward compatibility <em>will have them</em>.</p>
	<p>Freezing all future versions is not the answer; we will be sorry.  Let us pick-and-choose the fossilized browsers  <em>as we need them</em> and we will all have what we want.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://www.willoller.com/x-ua-bloated/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Smashing Magazine on Microformats</title>
		<link>http://www.willoller.com/smashing-magazine-on-microformats/</link>
		<comments>http://www.willoller.com/smashing-magazine-on-microformats/#comments</comments>
		<pubDate>Fri, 25 May 2007 14:51:43 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://www.blackdogdev.com/2007/smashing-magazine-on-microformats/</guid>
		<description><![CDATA[Smashing Magazine has a great comprehensive article on Microformats and their future. Microformats are a cool technology: they allow metadata (such as vCard info: Name, Address, Postal Code, etc.) to be inserted directly into traditional markup using existing hooks like classes. Don&#8217;t discount this kind of stuff, people. Its going to be native in Firefox [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.smashingmagazine.com/">Smashing Magazine</a> has a great comprehensive <a href="http://www.smashingmagazine.com/2007/05/04/microformats-what-they-are-and-how-to-use-them/">article on Microformats</a> and their future.</p><br />
<p>Microformats are a cool technology: they allow metadata (such as vCard info: Name, Address, Postal Code, etc.) to be inserted directly into traditional markup using existing hooks like <code>class</code>es.</p><br />
<p>Don&#8217;t discount this kind of stuff, people. Its going to be <a href="http://www.readwriteweb.com/archives/mozilla_does_microformats_firefox3.php">native in Firefox 3</a>, and if adoption rates are high, they could be everywhere.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://www.willoller.com/smashing-magazine-on-microformats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Google Sees Your Site</title>
		<link>http://www.willoller.com/how-google-sees-your-site/</link>
		<comments>http://www.willoller.com/how-google-sees-your-site/#comments</comments>
		<pubDate>Wed, 09 May 2007 01:04:26 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://www.blackdogdev.com/2007/how-google-sees-your-site/</guid>
		<description><![CDATA[Google&#8217;s massive databases come from its tiny minions &#8220;crawling&#8221; the web, traversing links and storing page views. They are called &#8220;spiders,&#8221; and for your site to get a good search rank from Google (and MSN, and Yahoo, etc&#8230; each of which has their own spiders), you need to know a little bit about what they [...]]]></description>
			<content:encoded><![CDATA[<p>Google&#8217;s massive databases come from its tiny minions &#8220;crawling&#8221; the web, traversing links and storing page views.   They are called &#8220;spiders,&#8221; and for your site to get a good search rank from Google (and MSN, and Yahoo, etc&#8230; each of which has their own spiders), you need to know a little bit about what they are and how they work.</p><br />
<p>This is by no means a comprehensive explanation of spiders or <acronym title="Search Engine Optimization">seo</acronym> methods. Volumes are being written about those topics.  This is just a basic introduction to spiders and accessability on the web.</p><br />
<h3>References</h3><br />
<ul><br />
<li><a href="http://www.google.com/bot.html" rel="nofollow">Google&#8217;s official Googlebot FAQ</a></li><br />
<li><a href="http://en.wikipedia.org/wiki/Googlebot">Googlebot</a> in <a href="http://en.wikipedia.org/">Wikipedia</a></li><br />
<li><a href="http://www.googleguide.com/google_works.html">How Google Works</a> from <a href="http://www.googleguide.com/">GoogleGuide</a></li><br />
</ul><br />
<h3>Spiders</h3><br />
<p>First of all, spiders are not people. They are programs run from Google&#8217;s servers that view your websites in a stripped-down, text-only virtual browser.  Second, unlike your house, having your website crawling with spiders can be a very good thing.</p><br />
<p>Black Dog&#8217;s home page might look a little like this when viewed by a spider:<br />

<a href="http://blackdogdev.com/blog/wp-content/uploads/2007/05/woller_how-google-sees-you.gif" title="Lynx Viewer showing the BlackDogDev Homepage" target="_blank" rel="lightbox"><img src="http://blackdogdev.com/blog/wp-content/uploads/2007/05/woller_how-google-sees-you.thumbnail.gif" alt="Lynx Viewer showing the BlackDogDev Homepage" /></a></p><br />
<p>This is a screenshot of a text-only view of blackdogdev.com&#8217;s homepage. As you can see, the big photo of an adorable dog is gone; so is our nice-looking logo.  All that remains is the most important part: the content. The text is the only thing the spiders care about.</p><br />
<h3>Accessability</h3><br />
<p>A spider can&#8217;t tell the difference between a photo of your dog and a photo of a fire engine, unless there is text available to give it meaning. Typically, this is achieved using an image&#8217;s <code>alt</code> attribute.</p><br />
<p>On blackdogdev.com, the <code>alt</code> text on the big dog photo is not very specific: &#8220;Loading Image&#8230;&#8221; doesn&#8217;t really mean anything.  The logo, however, is better. Its <code>alt</code> text is &#8220;Black Dog Studios&#8221;.  Much more relevant!</p><br />
<p>These <code>alt</code> attributes aren&#8217;t just for search engines. They are also used by screen-readers for the blind, who cannot see the screen at all but still take advantage of the wealth of knowledge on the net.  For the images on your site to be meaningful to the blind or to spiders, they must have descriptive alt tags: &#8220;Portrait of Henry Flagler, January 2, 1830 – May 20, 1913&#8221; rather than &#8220;H_Flagler&#8221;.  <code>alt</code> tags should <strong>never</strong> be left blank.</p><br />
<p>Remember: if you can&#8217;t navigate your site without graphics or flash, then spiders and the disabled can&#8217;t either. If you don&#8217;t like what you see when your site is stripped down to just text, a structural redesign may be in order.</p><br />
<h3>Tools</h3><br />
<p><a href="http://www.yellowpipe.com/yis/tools/lynx/IElynxviewEXT.cgi?url=http://blackdogdev.com/blog/2007/05/08/how-google-sees-your-site/">See this blog entry in a text-only browser</a>.</p><br />
<p>To see your site like Google does, you can use any of the available text-based browsers out there. A short list includes:</p>
<ul>
<li><a href="http://lynx.isc.org/">Lynx</a>, for UNIX and Linux, propably the most popular console-based borwser around</li>
<li><a href="https://addons.mozilla.org/firefox/1944/">Yellowpipe Lynx Viewer Firefox extension</a>. This is what I used for the screenshot.  Very handy.</li>
<li><a href="http://www.delorie.com/web/lynxview.html">delorie.com&#8217;s online Lynx converter</a> will turn any url into a Lynx-like text page.</li>
</ul>

 ]]></content:encoded>
			<wfw:commentRss>http://www.willoller.com/how-google-sees-your-site/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CSS Sibling Selectors</title>
		<link>http://www.willoller.com/7/</link>
		<comments>http://www.willoller.com/7/#comments</comments>
		<pubDate>Thu, 19 Apr 2007 20:11:39 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.blackdogdev.com/2007/7/</guid>
		<description><![CDATA[For those of us who care about the semantic web, standards, or the W3C, The Web Standards Project needs to be in your feed reader. I&#8217;ll admit, it wasn&#8217;t in mine; until now that is. The design of the site is awesome, and they eat their own cooking. (Plus, they use WordPress!) They employ css [...]]]></description>
			<content:encoded><![CDATA[	<p>For those of us who care about the semantic web, standards, or the W3C, <a href="http://www.webstandards.org/" title="Permanent link to The Web Standards Project">The Web Standards Project</a> needs to be in your feed reader.  I&#8217;ll admit, it wasn&#8217;t in mine; until now that is.</p>
	<p>The design of the site is awesome, and they eat their own cooking.  (Plus, they use WordPress!)  They employ css tricks I have seldom seen used before, and consistently use semantic tags (<code>&lt;abbr&gt;</code>, <code>&lt;q&gt;</code>).</p>
	<p>The best trick of all: the sibling selector.  Why?  Because it allows for truly semantic output with the leanest markup possible.  Before, I might have marked up a simple content block like this:</p>
	<p>[html]<br />
<div class="content">
   <h1>Title</h1>
   <img src="url" alt="pic related to story"/>
   <div class="block">
      <p class="intro">This is an introduction sentance or paragraph.  It is supposed to represent a blurb about the article below.</p>
      <div class="mainbody">
         <p>content</p>
         <p>content</p>
         <p>content</p>
         <p>content</p>
      </div>
      <p class="footer">Footer.  Date or links, or whatever.</p>
   </div><br />
</div><br />
[/html]</p>
	<p>This way, all of the elements have class hooks.  CSS is applied using the classes and simple hierarchies:</p>
	<p>[css]<br />
div.content { }<br />
div.content h1 { font-size: 1.8em; }<br />
div.content div.block { border: 1px solid black; }<br />
div.block p.intro { font-weight: bold; }<br />
div.block img { float: right; }<br />
div.block div.mainbody { clear: both; }<br />
div.mainbody p { color: #006; }<br />
p.footer { font-size: 0.7em; color: #888; }<br />
[/css]</p>
	<p>Class hooks are helpful, but not really needed if you use sibling selectors!  You, too, can write super-styled code without the additional markup headache!</p>
	<p>[html]<br />
<div class="content" >
   <h1>Title</h1>
   <img src="url" alt="That image again"/>
   <p>This is an introduction sentance or paragraph.  It is supposed to represent a blurb about the article below.</p>
   <p>content</p>
   <p>content</p>
   <p>content</p>
   <p>content</p>
   <p class="footer">Footer.  Date or links, or whatever.</p><br />
</div><br />
[/html]</p>
	<p>See, that code is cleaner and easier to maintain.  The CSS required to</p>
	<p>[css]<br />
div.content { }<br />
div.content h1 { font-size: 1.8em; }<br />
div.content p { color: #006; }<br />
div.content h1+p { color: #000; font-weight: bold; clear: both;}<br />
div.content h1+img { float: right; }<br />
div.content img { float: left } /* Just for fun */<br />
div.content p.footer { font-size: 0.7em; color: #888; }<br />
[/css]</p>
	<p>That&#8217;s all there is to it.  Now, the line between content and design is darkened.</p>
	<p>One thing: the class hook remains on the footer element.  This is because adjacent-sibling selectors do not work in reverse.  The selector applies only to the element after the <code>+</code>, and there is no selector that applies to a previous adjacent-sibling element.<br />
<h3>Sources</h3><br />
<a href="http://meyerweb.com/eric/articles/webrev/200007a.html">Eric Myer wrote about them</a>.<br />
<a href="http://www.w3.org/TR/REC-CSS2/selector.html">The W3C recommends them</a>.<br />
<a href="http://www.communitymx.com/content/article.cfm?cid=1C603">John Gallant and Holly Bergevin say IE7 supports them</a>.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://www.willoller.com/7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Limiting title and excerpt length with WordPress</title>
		<link>http://www.willoller.com/limiting-title-and-excerpt-length-with-wordpress/</link>
		<comments>http://www.willoller.com/limiting-title-and-excerpt-length-with-wordpress/#comments</comments>
		<pubDate>Sat, 14 Apr 2007 00:55:42 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[php programming]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.willoller.com/limiting-title-and-excerpt-length-with-wordpress/</guid>
		<description><![CDATA[Sometimes clients have very specific requirements. Sometimes they want autometic controls on simple things they have total control over anyway. I digress. In this case, blog titles needed to be of any length, but have their lengths truncated under certain circumstances. Furthermore, excerpts need to be able to be the default length (50 words), but [...]]]></description>
			<content:encoded><![CDATA[	<p>Sometimes clients have very specific requirements. Sometimes they want autometic controls on simple things they have total control over anyway.  I digress.</p>
	<p>In this case, blog titles needed to be of any length, but have their lengths truncated under certain circumstances.  Furthermore, excerpts need to be able to be the default length (50 words), but shorter (10 words) under those same certain circumstances.</p>
	<p>Fortunately for me, the excerpt was easily fixed using a plugin called <a href="http://guff.szub.net/2005/02/26/the-excerpt-reloaded/">the excerpt reloaded</a>.</p>
	<p>http://guff.szub.net/2005/02/26/the-excerpt-reloaded/</p>
	<p>Next, for the title length requirements, you will need to modifiy a core file: <code>wp-includes/post-template.php</code>.</p>
	<p>[php]<br />
function the_title($before = &#8216;&#8217;, $after = &#8216;&#8217;, $echo = true, $length = false) {
   $title = get_the_title();
    if ( $length &#38;&#38; is_numeric($length) ) {
       $title = substr( $title, 0, $length );
    }
    if ( strlen($title) > 0 ) {
       $title = apply_filters(&#8216;the_title&#8217;, $before . $title . $after, $before, $after);
       if ( $echo )
          echo $title;
       else
          return $title;
    }<br />
}<br />
[/php]</p>
	<p>Finally, when in <strong>The Loop</strong>, call the_title() like this:</p>
	<p>[php]< ?php the_title('', '', true, '40') ?>[/php]</p>
	<p>Now, the title will be a mere 40 characters long, and the excerpt (using <code>the_excerpt_reloaded()</code>) can be any desired length.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://www.willoller.com/limiting-title-and-excerpt-length-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS Sibling selectors</title>
		<link>http://www.willoller.com/css-sibling-selectors/</link>
		<comments>http://www.willoller.com/css-sibling-selectors/#comments</comments>
		<pubDate>Fri, 15 Dec 2006 04:27:50 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.willoller.com/css-sibling-selectors/</guid>
		<description><![CDATA[For those of us who care about the semantic web, standards, or the W3C, The Web Standards Project needs to be in your feed reader. I&#8217;ll admt, it wasn&#8217;t in mine; until now that is. The design of the site is awesome, and they eat their own cooking. (Plus, they use WordPress!) They employ css [...]]]></description>
			<content:encoded><![CDATA[	<p>For those of us who care about the semantic web, standards, or the W3C, <a href="http://www.webstandards.org/" title="Permanent link to The Web Standards Project">The Web Standards Project</a> needs to be in your feed reader.  I&#8217;ll admt, it wasn&#8217;t in mine; until now that is.</p>
	<p>The design of the site is awesome, and they eat their own cooking.  (Plus, they use WordPress!)  They employ css tricks I have seldom seen used before, and consistently use semantic tags (<code>&lt;abbr&gt;</code>, <code>&lt;q&gt;</code>).</p>
	<p>The best trick of all: the sibling selector.  Why?  Because it allows for truly semantic output with the leanest markup possible.  Before, I might have marked up a simple content block like this:<br />
<pre><br />
<code><br />
&lt;div class="content"&gt;&lt;br /&gt;<br />
&#160;&#160; &lt;h1&gt;Title&lt;/h1&gt;&lt;br /&gt;<br />
&#160;&#160; &lt;img src="url" alt="pic related to story"&gt;<br />
&#160;&#160; &lt;div class="block"&gt;&lt;br /&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&lt;p class="intro"&gt;This is an introduction sentance or paragraph.&#160;&#160;It is supposed to represent a blurb about the article below.&lt;/p&gt;&lt;br /&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&lt;div class="mainbody"&gt;&lt;br /&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;p&gt;content&lt;/p&gt;&lt;br /&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;p&gt;content&lt;/p&gt;&lt;br /&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;p&gt;content&lt;/p&gt;&lt;br /&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;p&gt;content&lt;/p&gt;&lt;br /&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&lt;/div&gt;&lt;br /&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&lt;p class="footer"&gt;Footer.&#160;&#160;Date or links, or whatever.&lt;/p&gt;&lt;br /&gt;<br />
&#160;&#160; &lt;/div&gt;&lt;br /&gt;<br />
&lt;/div&gt;<br />
</code><br />
</pre><br />
This way, all of the elements have class hooks.  CSS is applied using the classes and simple hierarchies:<br />
<pre><br />
<code><br />
div.content { }<br />
div.content h1 { font-size:1.8em; }<br />
div.content div.block { border:1px solid black; }<br />
div.block p.intro { font-weight: bold; }<br />
div.block img { float:right; }<br />
div.block div.mainbody { clear: both; }<br />
div.mainbody p { color: #006; }<br />
p.footer { font-size: 0.7em; color: #888; }<br />
</code><br />
</pre><br />
Class hooks are helpful, but not really needed if you use sibling selectors!  You, too, can write super-styled code without the additional markup headache!<br />
<pre><br />
<code><br />
&lt;div class="content" &gt;&lt;br /&gt;<br />
&#160;&#160; &lt;h1&gt;Title&lt;/h1&gt;&lt;br /&gt;<br />
&#160;&#160; &lt;img src="url" alt="That image again"/&gt;&lt;br /&gt;<br />
&#160;&#160; &lt;p&gt;This is an introduction sentance or paragraph.&#160;&#160;It is supposed to represent a blurb about the article below.&lt;/p&gt;&lt;br /&gt;<br />
&#160;&#160; &lt;p&gt;content&lt;/p&gt;&lt;br /&gt;<br />
&#160;&#160; &lt;p&gt;content&lt;/p&gt;&lt;br /&gt;<br />
&#160;&#160; &lt;p&gt;content&lt;/p&gt;&lt;br /&gt;<br />
&#160;&#160; &lt;p&gt;content&lt;/p&gt;&lt;br /&gt;<br />
&#160;&#160; &lt;p class="footer"&gt;Footer.&#160;&#160;Date or links, or whatever.&lt;/p&gt;&lt;br /&gt;<br />
&lt;/div&gt;<br />
</code><br />
</pre><br />
See, that code is cleaner and easier to maintain.  The CSS required to <br />
<pre><br />
<code><br />
div.content { }<br />
div.content h1 { font-size:1.8em; }<br />
div.content p { color: #006; }<br />
div.content h1+p { color: #000; font-weight: bold; clear:both;}<br />
div.content h1+img { float:right; }<br />
div.content img { float:left } /* Just for fun */<br />
div.content p.footer { font-size: 0.7em; color: #888; }<br />
</code></p>
	<p>That&#8217;s all there is to it.  Now, the line between content and design is darkened.</p>
	<p>One thing: the class hook remains on the footer element.  This is because adjacent-sibling selectors do not work in reverse.  The selector applies only to the element after the <code>+</code>, and there is no selector that applies to a previous adjacent-sibling element.</p>
	<p><h3>Sources</h3><br />
<a href="http://meyerweb.com/eric/articles/webrev/200007a.html">Eric Myer wrote about them</a>.<br />
<a href="http://www.w3.org/TR/REC-CSS2/selector.html">The W3C recommends them</a>.<br />
<a href="http://www.communitymx.com/content/article.cfm?cid=1C603">John Gallant and Holly Bergevin say IE7 supports them</a>.</pre></p>

 ]]></content:encoded>
			<wfw:commentRss>http://www.willoller.com/css-sibling-selectors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dotted Tables</title>
		<link>http://www.willoller.com/dotted-tables/</link>
		<comments>http://www.willoller.com/dotted-tables/#comments</comments>
		<pubDate>Fri, 22 Sep 2006 10:08:31 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://wp.willoller.com/dotted-tables</guid>
		<description><![CDATA[Dotted Tables are tables with an empty dotted td in the middle, like so: Someting &#8230;.................. $100 Something More &#8230;......... $10,000 Each line is a complete table, all held inside a div#dotted_tables that determines their length. Nowrap is also enforced on all table children, so be aware of this if you are using a dotted [...]]]></description>
			<content:encoded><![CDATA[<p> Dotted Tables are tables with an empty dotted td in the middle, <br />

    like so: </p>
<p>      Someting &#8230;.................. $100<br />

      Something More &#8230;......... $10,000</p>
	<p><p>    Each line is a complete table, all held inside a div#dotted_tables <br />
</p>
    that determines their length.<br />

    Nowrap is also enforced on all table children, so be aware of this <br />

    if you are using a dotted table within a body of text.</p>
<code style="white-space: pre;">
 #dotted_tables {
    width: 70%;
 }
 #dotted_tables table {
    width: 100%;
 }
 #dotted_tables table * {
    white-space: nowrap;
    font-size: 12px;
 }
 #dotted_tables p {
    margin-left: 0;
 }
 #dotted_tables .dotted {
    width: 100%;
    border-bottom: 1px dotted #aaaaaa;
 }
</code>

 ]]></content:encoded>
			<wfw:commentRss>http://www.willoller.com/dotted-tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

