<?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>fog of eternity &#187; Design Technique</title>
	<atom:link href="http://www.fogofeternity.com/category/design-technique/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fogofeternity.com</link>
	<description>we make great websites</description>
	<lastBuildDate>Wed, 24 Feb 2010 12:36:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How To Ruin A Perfectly Decent Website</title>
		<link>http://www.fogofeternity.com/2010/01/how-to-ruin-a-perfectly-decent-website/</link>
		<comments>http://www.fogofeternity.com/2010/01/how-to-ruin-a-perfectly-decent-website/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 13:03:03 +0000</pubDate>
		<dc:creator>Robin Cannon</dc:creator>
				<category><![CDATA[Design Technique]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Search engine optimization]]></category>
		<category><![CDATA[Web design]]></category>

		<guid isPermaLink="false">http://www.fogofeternity.com/?p=998</guid>
		<description><![CDATA[<a href="http://www.fogofeternity.com/2010/01/how-to-ruin-a-perfectly-decent-website/"><img width="150" height="150" src="http://www.fogofeternity.com/wp-content/uploads/2010/01/20100121-208x208.jpg" class="alignleft wp-post-image tfe" alt="Screenshot of the worst website in the world." title="All of this is terrible, but it" /></a><p>Yesterday I tweeted an article about what must be one of the worst websites in the world. It must be seen to be believed. Yet although such terrible sites exist, a far more common problem in web design is sites that are solid enough but ruined by failures to adhere to basic principles. Whether because of client demands or designer oversight, these sites undermine the &#91;&#8230;&#93;</p>]]></description>
			<content:encoded><![CDATA[<p>Yesterday I tweeted an article about what must be <a href="http://vectyr.com/2009/12/16/newest-candidate-for-worlds-most-horrific-website/">one of the worst websites in the world</a>. It must be seen to be believed. Yet although such terrible sites exist, a far more common problem in web design is sites that are solid enough but ruined by failures to adhere to basic principles. Whether because of client demands or designer oversight, these sites undermine the user experience and harm their business.</p>
<p><img class="alignnone size-full wp-image-999" title="All of this is terrible, but it's bad sites from competent designers that are a more insidious problem." src="http://www.fogofeternity.com/wp-content/uploads/2010/01/20100121.jpg" alt="Screenshot of the worst website in the world." height="350" width="500"/></p>
<p>I saw a tweet asking for feedback on a new website for a firm in Florida, <a href="http://www.ryandes.com/">Ryan Design Group</a>. Competently constructed in a technical sense, it’s a site that demonstrates the problems caused when client demands are at odds with good design practice.</p>
<h2>The Good</h2>
<p>The site in the main is reasonably well put together. It has a clear design ethos, a solid layout and good use of color. While not truly outstanding design, it’s better than most sites created for small local businesses. It showcases the company’s brand, has a nice (if over-engineered) navigation system, and lays out Ryan Design Group’s work and contact information effectively.</p>
<p>There are no major complaints about the core design and functionality of the site. Nothing to suggest the design company doesn’t know what they’re doing. It’s clear from their wider portfolio that they have the capacity to offer decent web design as part of an overall package of graphic and print services.</p>
<h2>The Bad AND The Ugly!</h2>
<p>Unfortunately, two huge errors mean the solid core of the site is going to be seen by a lot less people than might otherwise be the case.</p>
<h3>Don’t have a lengthy loading Flash splash page.</h3>
<h3><img class="alignnone size-full wp-image-1000 no-border" title="11 seconds is enough for most people to just give up and go elsewhere." src="http://www.fogofeternity.com/wp-content/uploads/2010/01/20100121_2.jpg" alt="Flash loading page for Ryan Designs" height="406" width="500"/></h3>
<p>It’s a core rule of web design, and this site falls straight into that trap. An eleven second Flash animation splash page. The Flash work is well done, but that’s beside the point.</p>
<p>I want to visit a website and immediately be able to access the information I’m looking for. It’s a two stage process; navigate to website then navigate to relevant content. A flash introduction page triples that; navigate to website, splash page loads, I acknowledge I’m not interested, I look for &#8220;skip intro&#8221;, I click it, I navigate to relevant content. Six steps instead of two.</p>
<p>The splash page adds no value, and a lot less people are going to stay on the site simply because it exists.</p>
<ul>
<li>Varying studies suggest that a splash page can reduce click through rates by anything from 25% up to more than <strong>70%</strong>. People just give up.</li>
<li>Flash splash pages lack important keyword phrases and significantly undermine search engine optimization.</li>
</ul>
<p>Splash pages provide a barrier to information. They can mean the difference between winning new business or losing it.</p>
<h3>Don’t embed music on your page, don’t open new windows.</h3>
<p>The site automatically loads music, another fundamental error. It compounds this error to ensure the music keeps playing by loading the rest of the site in a new tab/window! This wrests control of the browser from the user and is confusing. I didn’t realize initially that the site had loaded a new window so I couldn’t even work out where the music was coming from!</p>
<ul>
<li>Sound loops increase page download times. Load times should be optimized. More than 5% of US internet users still use dial-up (with evidence that in tough economic times more people revert to that cheaper option), and broadband speeds can be variable.</li>
<li>Musical tastes vary widely. I don’t mind the music on the Ryan Design Group site. Others might be put off because they hate it!</li>
<li>I’m already listening to music. With online radio stations, iTunes, Spotify, Pandora, Last.FM etc, millions of people are listening to music while they browse. Adding another soundtrack just leads to a horrible clash of noise. It could be even worse; if your visitor is on a Skype phone call while they browse you’ve just messed up their call.</li>
</ul>
<h2>Do You Say “No” To Your Client?</h2>
<p>The designers have done what they can to alleviate these huge problems, providing options to skip the Flash introduction and mute the music. But those are such negative issues for a website that there’s little that can be done to avoid the massive downsides to the user experience.</p>
<p>Should the designers have refused to integrate these client requests into the site? I would have. Clients hire me to be a web designer. They acknowledge I know more about web design than them. I’d explain to a client the problems of splash pages and integrated music, and why I wouldn’t do it, regardless of how insistent they were.</p>
<p>That’s a tough path to take. It’s where you have to have the confidence to say to the customer that they’re wrong, and to stick to your guns. I have no idea about this designer’s relationship with the client, their economic situation, or any of the other factors that made they accepted the client’s demands for this site.</p>
<p>I still think they should have said &#8220;no&#8221;. Every designer makes compromises, but compromise shouldn’t mean agreeing to something that you know is outright bad design practice. A clearly competent designer now has a portfolio piece that fails to demonstrate their ability. The immediate benefit of agreeing to this client’s demands could easily harm their future business.</p>
<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><img style="border: medium none ; float: right;" class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=ce38ee0f-705e-4066-adb2-2bf19c273908"/><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>
<img src="http://www.fogofeternity.com/?ak_action=api_record_view&id=998&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.fogofeternity.com/2010/01/how-to-ruin-a-perfectly-decent-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Golden Ratio &#8211; A Basic Intro And A Pedantic Question</title>
		<link>http://www.fogofeternity.com/2010/01/the-golden-ratio-a-basic-intro-and-a-pedantic-question/</link>
		<comments>http://www.fogofeternity.com/2010/01/the-golden-ratio-a-basic-intro-and-a-pedantic-question/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 15:00:30 +0000</pubDate>
		<dc:creator>Robin Cannon</dc:creator>
				<category><![CDATA[Design Technique]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[Golden ratio]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[White space]]></category>

		<guid isPermaLink="false">http://www.fogofeternity.com/?p=993</guid>
		<description><![CDATA[<a href="http://www.fogofeternity.com/2010/01/the-golden-ratio-a-basic-intro-and-a-pedantic-question/"><img width="150" height="150" src="http://www.fogofeternity.com/wp-content/uploads/2010/01/20100113-208x208.jpg" class="alignleft wp-post-image tfe" alt="Picture of the Parthenon" title="If you" /></a><p>It’s cool to know that when you put together a web page design you’re still using inspiration from two and half millennia ago. Yes, that blog you’re coding is drawing on the principles that went into the design of the Parthenon, principles of Euclidean geometry. Automatically makes you feel smarter just to hear that, doesn’t it? I’m talking about the “golden ratio ”, used by &#91;&#8230;&#93;</p>]]></description>
			<content:encoded><![CDATA[<p>It’s cool to know that when you put together a web page design you’re still using inspiration from two and half millennia ago. Yes, that blog you’re coding is drawing on the principles that went into the design of the Parthenon, principles of Euclidean geometry. Automatically makes you feel smarter just to hear that, doesn’t it? I’m talking about the “<a id="aptureLink_WkRcBzbXBY" href="http://en.wikipedia.org/wiki/Golden%20ratio">golden ratio</a> ”, used by artists and architectures for centuries to define the dimensional relationships of their work.</p>
<p><img class="alignnone size-full wp-image-994" title="If you're using design principles from the Parthenon, you must be doing something right...right?" src="http://www.fogofeternity.com/wp-content/uploads/2010/01/20100113.jpg" alt="Picture of the Parthenon" width="500" height="332" /></p>
<p>Many people probably first heard of the golden ratio in Dan Brown’s faux cerebral Da Vinci Code. It’s noted there as 1.618 / 1. That’s a slightly simplified version, like saying <a id="aptureLink_U6EKj1maPM" href="http://en.wikipedia.org/wiki/Pi">Pi</a> is simply 3.14, but close enough (like Pi, you can go on indefinitely with your decimals). From a design standpoint, simply put, things look naturally good if their dimensional ratio are close to this – e.g. a rectangle that’s 1.618 metres long and 1 metre wide.</p>
<h2>Easy Web Implementation</h2>
<p>The most obvious way to implement the golden ratio in web design is when you have a two column layout for a website. You have your main column and your sidebar. So why not use the golden ratio to determine the widths of each section? Easily done in any fixed width design. I prefer fixed width as a designer (an entirely subjective choice, the fixed vs fluid argument will run forever), so I utilize the golden ratio regularly.</p>
<p>It works like this. I’m designing a size that’s going to be 960 pixels wide, with a main column and a sidebar. So I head off to one of those wonderfully useful pages you find on the web sometimes, <a href="http://goldenratiocalculator.com">goldenratiocalculator.com</a>. I enter 960 as my width, and the calculator tells me that my sidebar should be 367 pixels wide, and my main content should be 593 pixels wide. Quickly and easily I’ve got a solid aesthetic basis for my site.</p>
<p>You can extend the use of the golden ratio far more widely. You can use it for line-height vs font-size for example, for margins of headers, for input boxes vs label width in forms. Clearly it’s not the only design choice you ever need make, but it’s proven over millennia to be a great one.</p>
<h2>Overly Pedantic Question</h2>
<p>This is one for the designers out there. Do you add margins before or after you calculate the golden ratio for your columns?</p>
<p>If we just made our sidebar 367 pixels wide and the main content 593 pixels wide there’d be no margin. The text in the sidebar would run up against the content without a gap. And it’s always been clear that good margins and white space in general can really improve the visual impact of a web design. So we’re going to need margins.</p>
<p>Let’s say we’re going to have a 30 pixel margin between our sidebar and our main content. If we’ve already made the golden ratio division, that means subtracting 15 pixels each from the width of our two columns. So the sidebar is 352 pixels wide and the main content is 578 pixels.</p>
<p>Except that isn’t the golden ratio any more. It’s pretty close, but it’s not exact. Of course, we could just say “screw it”, because the difference is minimal, but sometimes I like to be pedantic. As display screens and resolutions get larger, the importance of an accurate reflection of the golden ration might get more important in any case.</p>
<p>I tend to assume that the margin is outside of the scope of the golden ratio. I know that I’m going to have a margin of 30 pixels out of a total width of 960 pixels. That means I need to work out my golden ratio on the basis of 930 and not 960. That gives me a sidebar width of 355 pixels and a content width of 575 pixels. OK, we’re talking about a 3 pixel difference here, barely noticeable, but still.</p>
<p>Anyone else have a preference on this one way or another? Or is it too anal to even care about it?!</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=87da5788-0ecd-4093-a634-e51c13d1b311" alt="" /><span class="zem-script more-related pretty-attribution"><br />
<script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script><br />
<br />
 </span></div>
<img src="http://www.fogofeternity.com/?ak_action=api_record_view&id=993&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.fogofeternity.com/2010/01/the-golden-ratio-a-basic-intro-and-a-pedantic-question/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Displaying Recent Pages (Not Posts) With WordPress</title>
		<link>http://www.fogofeternity.com/2009/10/displaying-recent-pages-not-posts-with-wordpress/</link>
		<comments>http://www.fogofeternity.com/2009/10/displaying-recent-pages-not-posts-with-wordpress/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 18:11:38 +0000</pubDate>
		<dc:creator>Robin Cannon</dc:creator>
				<category><![CDATA[Design Technique]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress pages]]></category>
		<category><![CDATA[wordpress tweaks]]></category>

		<guid isPermaLink="false">http://www.fogofeternity.com/?p=845</guid>
		<description><![CDATA[<a href="http://www.fogofeternity.com/2009/10/displaying-recent-pages-not-posts-with-wordpress/"><img width="150" height="150" src="http://www.fogofeternity.com/wp-content/uploads/2009/10/20091015-208x208.jpg" class="alignleft wp-post-image tfe" alt="Picture of old book" title="Highlighting recent pages has its uses" /></a><p>I&#8217;ve spent some time in the last few days updating the portfolio design for the site. Each item in my portfolio is a seperate WordPress page. I wanted the portfolio index to highlight the most recent portfolio items in a list, and to update this list automatically every time I add a new item.</p>
<p></p>
<p>Highlighting recent posts in WordPress is really easy. The basic WordPress index.php &#91;&#8230;&#93;</p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent some time in the last few days updating the <a href="/portfolio/">portfolio</a> design for the site. Each item in my portfolio is a seperate WordPress page. I wanted the portfolio index to highlight the most recent portfolio items in a list, and to update this list automatically every time I add a new item.</p>
<p><img class="alignnone size-full wp-image-852" title="Highlighting recent pages has its uses" src="http://www.fogofeternity.com/wp-content/uploads/2009/10/20091015.jpg" alt="Picture of old book" width="500" height="367" /></p>
<p>Highlighting recent posts in WordPress is really easy. The basic WordPress <em>index.php</em> page does it automatically, adding each new blog post to the page as it&#8217;s written. It&#8217;s also easy to add links to those posts through sidebar widgets. It&#8217;s more difficult to highlight pages based on when they were created. Pages are supposed to be more static, so date based calls to that content is less common.</p>
<h2>Making WordPress Look On Pages As Posts</h2>
<p>The portfolio page on my site uses a custom template. I worked on some code to make WordPress look at new pages in the same way it looks at posts, and display them based on how recently they were created.</p>
<pre>&lt;?php $portfolio_items = array(
 'post_type' =&gt; 'page',
 'showposts' =&gt; 3
 );
 $posts = get_posts($portfolio_items);
 if ($posts) {
 foreach ($posts as $post) {
 setup_postdata($post);
 } } ?&gt;</pre>
<p>This makes WordPress pull down pages as $portfolio_items (this can be defined as anything), which are defined to render in the same was as posts. I can then define how many I want to show.</p>
<h2>Displaying The Information On The Page</h2>
<p>Now I need to display the information on the page (the above code makes WordPress pull down the correct information, but doesn&#8217;t display anything. I can do this by adding code in the same way as I&#8217;d display any post or page when developing a WordPress template.</p>
<pre>&lt;?php $portfolio_items = array(
 'post_type' =&gt; 'page',
 'showposts' =&gt; 3
 );
 $posts = get_posts($portfolio_items);
 if ($posts) {
 foreach ($posts as $post) {
 setup_postdata($post);
?&gt;

&lt;li&gt;&lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="Link to
&lt;?php the_title() ; ?&gt; portfolio page"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;

&lt;?php } } ?&gt;</pre>
<p>I just want to display the three most recent pages as links in a list, but you could display excerpts from the page, full articles or any other information if you wanted.</p>
<h2>What If The Page Isn&#8217;t A Portfolio Piece?</h2>
<p>We&#8217;re nearly finished, but there&#8217;s one small flaw. If all I ever added to my site was portfolio item pages then there&#8217;d be no problem. The code is pulling down any new page, though, so if I add a new page that&#8217;s not a portfolio piece it will still show up. I need to limit my results to a subset of pages.</p>
<p>Luckily WordPress makes this easy. All my portfolio item pages are children of the main portfolio page. So I simply need to add a parameter that limits the pages that are getting called.</p>
<p>I need to add a new line:</p>
<pre>'post-type' =&gt; 'page',
<strong>'post_parent' =&gt; '163', // this is the new line
</strong>'showposts' =&gt; 3</pre>
<p>&#8216;163&#8242; is the page ID of my portfolio page. Obviously you would need to check on the ID of your own pages if you were implementing this on your own site.</p>
<p>I&#8217;m happy with the results. The portfolio page calls a simple list of my three most recent portfolio pieces, and will update that list automatically every time I add a new one.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=703664ae-e3b3-4edf-bf78-3b527163adaf" alt="" /><span class="zem-script more-related pretty-attribution"><br />
<script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script><br />
</span></div>
<img src="http://www.fogofeternity.com/?ak_action=api_record_view&id=845&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.fogofeternity.com/2009/10/displaying-recent-pages-not-posts-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple Collapsible Content With jQuery</title>
		<link>http://www.fogofeternity.com/2009/09/simple-collapsible-content-with-jquery/</link>
		<comments>http://www.fogofeternity.com/2009/09/simple-collapsible-content-with-jquery/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 22:17:14 +0000</pubDate>
		<dc:creator>Robin Cannon</dc:creator>
				<category><![CDATA[Design Technique]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[collapsible]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://www.fogofeternity.com/?p=657</guid>
		<description><![CDATA[<a href="http://www.fogofeternity.com/2009/09/simple-collapsible-content-with-jquery/"><img width="150" height="150" src="http://www.fogofeternity.com/wp-content/uploads/2009/09/20090929_pic-208x208.jpg" class="alignleft wp-post-image tfe" alt="Picture of top hat" title="Collapsible content gives you flexible display options" /></a><p>Dynamically hiding and showing content within a web page adds interactivity and gives the user more control over what they want to read. Scripting can provide that collapsible functionality, but it&#8217;s also important to keep the content accessible. The flexibility of the jQuery library lets us achieve this with relative ease.</p>
<p></p>
<p>One of the most appropriate times to use this display toggle is with the dl, &#91;&#8230;&#93;</p>]]></description>
			<content:encoded><![CDATA[<p>Dynamically hiding and showing content within a web page adds interactivity and gives the user more control over what they want to read. Scripting can provide that collapsible functionality, but it&#8217;s also important to keep the content accessible. The flexibility of the jQuery library lets us achieve this with relative ease.</p>
<p><img title="Collapsible content gives you flexible display options" src="http://www.fogofeternity.com/wp-content/uploads/2009/09/20090929_pic.jpg" alt="Picture of top hat" width="500" height="500" /></p>
<p>One of the most appropriate times to use this display toggle is with the <em>dl</em>, or definition list, tag. It means that we can display the item with the <em>dt</em> tag, but allow users to expand the list and view individual item descriptions stored in the <em>dd</em> tag.</p>
<h2>A Basic Definition List</h2>
<p>The HTML for the list is very simple.</p>
<pre>&lt;dl&gt;
&lt;dt&gt;Item 1&lt;/dt&gt;
&lt;dd&gt;Item 1 description&lt;/dd&gt;
&lt;dt&gt;Item 2&lt;/dt&gt;
&lt;dd&gt;Item 2 description&lt;/dd&gt;
&lt;/dl&gt;
</pre>
<p>We’re going to use a combination of jQuery and CSS to toggle visibility for the <em>dd</em> content.</p>
<h2>Hiding The <em>dd</em> Content</h2>
<p>Simple CSS would allow us to hide each <em>dd</em>:</p>
<pre>dd </pre>
<pre>{ </pre>
<pre>display: none; </pre>
<pre>}</pre>
<p>But we want to be able to have different <em>dd</em> tags toggled on and off. We’re going to do this by defining the class of the <em>dt</em> tags. So we’re better defining the CSS so that it specifies <em>dd</em><em> tags that are adjacent to </em><em>dt</em><em>.</em></p>
<pre>dt + dd </pre>
<pre>{ </pre>
<pre>display: none; </pre>
<pre>}</pre>
<h2>Creating The Toggle</h2>
<p>Now we want to use jQuery to dynamically change the class of the <em>dt</em>, and we’ll use CSS to change the visibility of the adjacent <em>dd</em>.</p>
<p>Our jQuery is:</p>
<pre>$(document) .ready(function() </pre>
<pre>{ </pre>
<pre> $('dt') .click(function(event) </pre>
<pre> { </pre>
<pre> $(this) .toggleClass('active'); </pre>
<pre> });</pre>
<pre>}</pre>
<p>Now if we click on the <em>dt</em> it will toggle the class “active” on and off. This lets us update our CSS.</p>
<pre>dt + dd </pre>
<pre>{ </pre>
<pre>display: none; </pre>
<pre>}  </pre>
<pre>dt.active + dd </pre>
<pre>{ </pre>
<pre>display: inherit; </pre>
<pre>}</pre>
<p>The <em>dd</em> is set to display when the preceding <em>dt</em> has the class “active”. That means when a user clicks on the <em>dt</em> and sets its class to “active” it will show the additional content. When they click the <em>dt</em> again, it will remove the “active” class and hide the <em>dd</em> content.</p>
<h2>Wait, There’s An Accessibility Issue</h2>
<p>The method works great for nearly everyone, but there’s a problem. If a user has Javascript disabled then they won’t be able to access the <em>dd</em> content at all. That’s because our CSS sets the <em>dd</em> to display: none as default. We need to fix that, and the best way to do it is to use jQuery to create a class which we use to hide the <em>dd</em>.</p>
<pre>$(document) .ready(function() </pre>
<pre>{ </pre>
<pre> $('dt') .addClass('inactive');</pre>
<pre> $('dt') .click(function(event) </pre>
<pre> { </pre>
<pre> $(this) .toggleClass('active'); </pre>
<pre> });</pre>
<pre>}</pre>
<p>Then we need to update our CSS.</p>
<pre>dt.inactive + dd </pre>
<pre>{ </pre>
<pre>display: none; </pre>
<pre>}  </pre>
<pre>dt.active + dd </pre>
<pre>{ </pre>
<pre>display: inherit </pre>
<pre>}</pre>
<p>If Javascript is disabled then the “inactive” class is never loaded, so all the content stays visible. If Javascript is enabled then each <em>dt</em> is given the class “inactive” and all the adjacent <em>dd</em> content is hidden. Clicking on a <em>dt</em> toggles the “active” class, and because that’s after the “inactive” class in our CSS, it will override it and make the relevant content visible.</p>
<p>That means that users with Javascript disabled will automatically see all the content when the page loads. Users with Javascript enabled will see a list of <em>dt</em> titles, and will be able to toggle the visibility of the <em>dd</em> content.</p>
<p><a href="http://www.fogofeternity.com/tutorials/collapsible-dl-with-jquery/dl-with-jquery.html">Click here to view an example of the functional code</a>.</p>
<p><strong>Edit: Apparently this has some problems in IE. For some reason, although jQuery correctly attaches the right classes to the divs, and IE identifies the correct stylesheet, the &#8216;click&#8217; event doesn&#8217;t change the appearance. I&#8217;ll try and track down the problem, and write a note about the solution when I do.</strong></p>
<img src="http://www.fogofeternity.com/?ak_action=api_record_view&id=657&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.fogofeternity.com/2009/09/simple-collapsible-content-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Correctly Using H1 Tags With WordPress</title>
		<link>http://www.fogofeternity.com/2009/09/correctly-using-h1-tags-with-wordpress/</link>
		<comments>http://www.fogofeternity.com/2009/09/correctly-using-h1-tags-with-wordpress/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 17:10:25 +0000</pubDate>
		<dc:creator>Robin Cannon</dc:creator>
				<category><![CDATA[Design Technique]]></category>
		<category><![CDATA[h1]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.fogofeternity.com/?p=621</guid>
		<description><![CDATA[<a href="http://www.fogofeternity.com/2009/09/correctly-using-h1-tags-with-wordpress/"><img width="150" height="150" src="http://www.fogofeternity.com/wp-content/uploads/2009/09/20090927-208x208.jpg" class="alignleft wp-post-image tfe" alt="Image of soccer players heading the ball" title="Search engines give good weight to header tags" /></a><p>Header tags like &#60;h1&#62; are important HTML structural items. They define the semantic layout of a page. The highest weight header tag, &#60;h1&#62;, defines the main subject of a section. Search engines value header tags when examining a web page/ The correct use of &#60;h1&#62; can add value, but incorrect use can see a page penalised by the likes of Google. WordPress makes it easy &#91;&#8230;&#93;</p>]]></description>
			<content:encoded><![CDATA[<p>Header tags like &lt;h1&gt; are important HTML structural items. They define the semantic layout of a page. The highest weight header tag, &lt;h1&gt;, defines the main subject of a section. Search engines value header tags when examining a web page/ The correct use of &lt;h1&gt; can add value, but incorrect use can see a page penalised by the likes of Google. WordPress makes it easy to use the &lt;h1&gt; correctly.</p>
<p><img class="alignnone size-full wp-image-625" title="Search engines give good weight to header tags" src="http://www.fogofeternity.com/wp-content/uploads/2009/09/20090927.jpg" alt="Image of soccer players heading the ball" width="480" height="320" /></p>
<h2>Using &lt;h1&gt; Tags Badly</h2>
<p>&lt;h1&gt; tags are commonly used as the logo of a website. They use CSS image replacement to wrap the logo graphic inside the tags. The &lt;h1&gt; is always the site name, whichever page you&#8217;re on. Other page headings are  tagged with &lt;h2&gt;. The &lt;h1&gt; tag is not intended to define the name of a site, but the topic of a page or section. Sites that use this practice are only using &lt;h1&gt; correctly on their home page (on that page the site name <strong>is</strong> the main topic), but incorrectly on subsequent pages.</p>
<p>&lt;h1&gt; tags should define the primary topic of each page. Each page should have a single &lt;h1&gt; tag (except  in very rare situations where a single page has two equally important and clearly seperate topics).</p>
<h2>Ways To Correctly Use &lt;h1&gt; Tags</h2>
<h3>WordPress</h3>
<p>This site is powered with WordPress. On the front page the title of the site is the &lt;h1&gt;. On  sub-pages it&#8217;s the page topic that&#8217;s the &lt;h1&gt;. WordPress makes it easy to achieve this automatically.</p>
<p>My template&#8217;s header.php has the following code:</p>
<p>
<div class="codesnip-container" >&lt;div id=&#8221;blog-title&#8221;&gt;</div>
</p>
<p>
<div class="codesnip-container" >&lt;?php if ( is_front_page() ) { ?&gt;<br />
 &lt;h1&gt;&lt;?php bloginfo ( &#8216;name&#8217; ) ?&gt; | &lt;?php bloginfo ( &#8216;description&#8217; ) ?&gt;&lt;/h1&gt;<br />
 &lt;?php } elseif ( has_excerpt() ) { ?&gt;<br />
 &lt;h1&gt;Blog Index | &lt;?php bloginfo (&#8216;name&#8217; ) ?&gt;&lt;/h1&gt;<br />
 &lt;?php } else { ?&gt;<br />
 &lt;p&gt;&lt;?php bloginfo ( &#8216;name&#8217; ) ?&gt; | &lt;?php bloginfo ( &#8216;description&#8217; ) ?&gt;&lt;/p&gt;<br />
 &lt;?php } ?&gt;</div>
</p>
<p>
<div class="codesnip-container" >&lt;/div&gt;</div>
</p>
<p>WordPress automatically identifies if someone is on the frontpage of my site. If they are, it wraps the blog name and description in an &lt;h1&gt; tag. If not, that information is wrapped in a &lt;p&gt; tag. &lt;h1&gt; and &lt;p&gt; tags in the &#8220;blog-title&#8221; div are styled to look identical using CSS.</p>
<p>I also need to define the &#8220;post&#8221; title as an &lt;h1&gt; in my index.php, page.php and other template files. I use a custom template for my home page. If I was using the blog index as my home page then I&#8217;d set blog entry titles to be &lt;h2&gt; in the index.php and &lt;h1&gt; in other template files.</p>
<p>I can ensure that the &lt;h1&gt; tag accurately describes the subject of a particular page in my template. I don&#8217;t devalue the search engine benefits of the &lt;h1&gt; tag&#8217;s weight by always using it to define the logo</p>
<img src="http://www.fogofeternity.com/?ak_action=api_record_view&id=621&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.fogofeternity.com/2009/09/correctly-using-h1-tags-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
