<?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>Pixel Acres &#187; HTML/XHTML</title>
	<atom:link href="http://f6design.com/journal/category/xhtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://f6design.com/journal</link>
	<description>Adventures in web and graphic design</description>
	<lastBuildDate>Wed, 28 Dec 2011 22:41:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Build a parallax scrolling website interface with jQuery and CSS</title>
		<link>http://f6design.com/journal/2011/08/06/build-a-parallax-scrolling-website-interface-with-jquery-and-css/</link>
		<comments>http://f6design.com/journal/2011/08/06/build-a-parallax-scrolling-website-interface-with-jquery-and-css/#comments</comments>
		<pubDate>Sun, 07 Aug 2011 02:36:52 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML/XHTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=2141</guid>
		<description><![CDATA[Parallax scrolling website interfaces have been popping up all over the place recently. I didn&#8217;t want to miss out on the fun, so I have put together a parallax scrolling demo built using jQuery and CSS. Parallax what? Even if you&#8217;re not familiar with the term &#8220;parallax scrolling&#8221; you will certainly be familiar with the [...]]]></description>
			<content:encoded><![CDATA[<p>Parallax scrolling website interfaces have been popping up all over the place recently. I didn&#8217;t want to miss out on the fun, so I have put together a parallax scrolling demo built using jQuery and CSS.</p>
<p><a href="http://f6design.com/projects/parallax-scrolling/"><img src="http://f6design.com/journal/wp-content/uploads/2011/08/parallax-screenshot-578w.jpg" alt="Parallax scrolling interface" width="578" height="423" class="contentImg" /></a></p>
<h3>Parallax what?</h3>
<p>Even if you&#8217;re not familiar with the term &#8220;parallax scrolling&#8221; you will certainly be familiar with the technique. <a href="http://en.wikipedia.org/wiki/Parallax_scrolling">Parallax scrolling</a> is a 2d animation process that creates an illusion of depth by animating foreground layers faster than background layers. When you observe the landscape from a moving car, objects closer to the car appear to pass you faster than scenery further away. Parallax scrolling uses the same principle to trick the viewer into thinking they are observing a 3d scene.</p>
<h3>Demo and Download</h3>
<p>My demo web page shows one approach to building a vertical parallax scrolling interface:</p>
<p><a href="http://f6design.com/projects/parallax-scrolling/">View demo</a><br />
<a href="http://f6design.com/projects/parallax-scrolling/parallax-scrolling-demo.zip">Download source</a></p>
<p>You can scroll in the usual fashion, use the navigation menu at the right-hand side of the page, or the next/prev buttons that appear underneath each article. As you scroll, the page&#8217;s four content layers are animated independently of one another to create an illusion of depth.</p>
<p>The scrolling looks smoothest in Safari (at least that&#8217;s the case on my PC), but my demo should work in any modern browser.</p>
<p><em><strong>Disclaimer 1:</strong> Because this is just an experiment I&#8217;ve not spent any time optimising the demo to work on mobile devices. I wanted to keep the demo lean &#8216;n&#8217; mean, and not clutter it by sniffing mobile browsers and forking my code. On a production site you&#8217;d want to ensure that the site degrades gracefully on mobile devices, where scroll events and fixed positioning might work in unexpected ways.</em></p>
<p><em><strong>Disclaimer 2:</strong> The navigation menu in my demo is inspired by the menu on the Nike <a href="http://www.nikebetterworld.com/">Better World</a> website. If you plan on implementing a similar menu on a production site, please be aware of its origin.</em></p>
<h3>How it works</h3>
<p>The articles and background layers are given a fixed positioned with CSS, and assigned a <code>z-index</code> so that the foreground layers appear above the background layers. The four layers are: small clouds, large clouds, balloon/landscape images, articles.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* foreground (ballons/landscape) */</span>
<span style="color: #cc00cc;">#parallax-bg3</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">3</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">fixed</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">50</span>%</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* align left edge with center of viewport */</span>
    <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">940px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-470px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* move left by half element's width */</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Within each layer individual content elements are absolutely positioned. This was the most fiddly part of the process, since the elements need to positioned in such a way that they align in a pleasing manner when the user scrolls to any of the four articles. In this case it was really just a process of trial and error.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#bg3-1</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-111px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">355px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#bg3-2</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">812px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">321px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* etc... */</span></pre></div></div>

<p>A few lines of jQuery control the parallax effect, triggered by a scroll event. I was surprised how easy this was to achieve, it is literally just a handful of lines of code.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'scroll'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    parallaxScroll<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> parallaxScroll<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> scrolled <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">scrollTop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#parallax-bg1'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span>scrolled<span style="color: #339933;">*</span>.25<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#parallax-bg2'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span>scrolled<span style="color: #339933;">*</span>.5<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#parallax-bg3'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span>scrolled<span style="color: #339933;">*</span>.75<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>As you can see the CSS <code>top</code> property is used to move each layer as the user scrolls. The foreground layer is always aligned to the top of the document, while the movement of other layers is adjusted according to their depth. The lower a layer sits in the stack, the less distance it is moved.</p>
<p>The rest of the jQuery is concerned with controlling the navigation menus. When the user clicks a navigation button the page scrolls to the top of the associated article. In the event that the user has JavaScript disabled, regular HTML anchor links still allow the page to be navigated, but without any fancy pants animations.</p>
<h3>Next steps</h3>
<p>I&#8217;m sure there are plenty of other approaches to parallax scrolling, and hopefully my experiment provides a starting point for your own explorations of the technique.</p>
<h3>Update</h3>
<p>I have updated the demo so that each parallax layer is given a fixed, rather than absolute, position. This approach gives a smoother scrolling effect.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2011/08/06/build-a-parallax-scrolling-website-interface-with-jquery-and-css/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Monokai theme for phpDesigner</title>
		<link>http://f6design.com/journal/2011/04/27/monokai-theme-for-phpdesigner/</link>
		<comments>http://f6design.com/journal/2011/04/27/monokai-theme-for-phpdesigner/#comments</comments>
		<pubDate>Wed, 27 Apr 2011 22:15:42 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML/XHTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Toolbox]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=1364</guid>
		<description><![CDATA[Last year I created a port of the Monokai syntax highlighting theme for phpDesigner and posted it in the phpDesigner forums, but I think it deserves a proper home so I&#8217;m archiving it here on Pixel Acres. PHP example: HTML example: CSS example: JavaScript example: I&#8217;m not sure who designed the Monokai theme originally, but [...]]]></description>
			<content:encoded><![CDATA[<p>Last year I created a port of the Monokai syntax highlighting theme for <a href="http://www.mpsoftware.dk/phpdesigner.php">phpDesigner</a> and posted it in the <a href="http://www.facebook.com/topic.php?uid=108672675347&#038;topic=11050">phpDesigner forums</a>, but I think it deserves a proper home so I&#8217;m archiving it here on Pixel Acres.</p>
<h4>PHP example:</h4>
<p><img src="http://f6design.com/journal/wp-content/uploads/2011/04/monokai_theme_php.png" alt="" title="monokai_theme_php" width="450" height="389" class="alignnone size-full wp-image-1377" /></p>
<h4>HTML example:</h4>
<p><img src="http://f6design.com/journal/wp-content/uploads/2011/04/monokai_theme_html.png" alt="" title="monokai_theme_html" width="450" height="179" class="alignnone size-full wp-image-1378" /></p>
<h4>CSS example:</h4>
<p><img src="http://f6design.com/journal/wp-content/uploads/2011/04/monokai_theme_css.png" alt="" title="monokai_theme_css" width="450" height="224" class="alignnone size-full wp-image-1381" /></p>
<h4>JavaScript example:</h4>
<p><img src="http://f6design.com/journal/wp-content/uploads/2011/04/monokai_theme_js.png" alt="" title="monokai_theme_js" width="450" height="258" class="alignnone size-full wp-image-1383" /></p>
<p>I&#8217;m not sure who designed the Monokai theme originally, but it has cropped up in <a href="http://macromates.com/">Textmate</a>, <a href="http://notepad-plus-plus.org/">Notepad++</a>, <a href="http://www.sublimetext.com/">Sublime</a> &#8211; where it is the default colour scheme &#8211; and no doubt a bunch of other editors as well.</p>
<p>My version of Monokai is based on a Notepad++ theme, but I have standardised the color of variables (green) and symbols (white) across all the languages.</p>
<p>I don&#8217;t actually use phpDesigner much these days &#8211; I&#8217;ve jumped ship for <a href="http://www.aptana.com/products/studio3">Aptana Studio 3</a> &#8211; but I still think it is a great code editor, and hopefully someone out there will get some use from my theme.</p>
<h3>Download</h3>
<p><a href="http://f6design.com/projects/f6-monokai-phpd-theme/f6_monokai_phpd_theme.rar">Download Monokai theme for phpDesigner</a></p>
<p>Installation and uninstallation instructions are included with the theme. The theme has syntax highlighting colors for the four languages I work with: HTML, CSS, JavaScript and PHP.</p>
<h3>Important</h3>
<p>There is currently a bug in phpDesigner that sometimes causes the ‘separator’ colors to revert to their defaults (e.g. the color of  tags reverts to black). The only sure-fire way to get things back to normal is to open the phpDesigner preferences dialog, and click ‘OK’.</p>
<p>Apparently this bug will be fixed in the next release of phpDesigner (yay!).</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2011/04/27/monokai-theme-for-phpdesigner/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sunset: A syntax highlighting theme for phpDesigner</title>
		<link>http://f6design.com/journal/2010/09/29/sunset-a-syntax-highlighting-theme-for-phpdesigner/</link>
		<comments>http://f6design.com/journal/2010/09/29/sunset-a-syntax-highlighting-theme-for-phpdesigner/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 07:19:24 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML/XHTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Toolbox]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=1057</guid>
		<description><![CDATA[My weapon of choice for code editing is the excellent program phpDesigner, but every so often I like to test drive a different editor to see what I might be missing out on. Recently I spent some time playing with Notepad++, and one feature that jumped out at me was the ability to choose from [...]]]></description>
			<content:encoded><![CDATA[<p>My weapon of choice for code editing is the excellent program <a href="http://www.mpsoftware.dk/">phpDesigner</a>, but every so often I like to test drive a different editor to see what I might be missing out on. Recently I  spent some time playing with <a href="http://notepad-plus-plus.org/">Notepad++</a>, and one feature that jumped out at me was the ability to choose from a large number of pre-installed <a href="http://en.wikipedia.org/wiki/Syntax_highlighting">syntax highlighting</a> themes.</p>
<p>When I switched back to phpDesigner, the default blue-on-white color scheme seemed a tad boring, so I decided it was time to pimp my IDE! Unfortunately user created themes for phpDesigner are thin on the ground, which left me no option but to make my own.</p>
<h4>PHP example:</h4>
<p><img src="http://f6design.com/journal/wp-content/uploads/2010/09/sunset_theme_php.png" alt="Sunset theme for phpDesigner - PHP code" width="450" height="389" /></p>
<h4>HTML example:</h4>
<p><img src="http://f6design.com/journal/wp-content/uploads/2010/09/sunset_theme_html.png" alt="Sunset theme for phpDesigner - HTML markup" width="450" height="164" /></p>
<h4>CSS example:</h4>
<p><img src="http://f6design.com/journal/wp-content/uploads/2010/09/sunset_theme_css.png" alt="Sunset theme for phpDesigner - CSS" width="450" height="224" /></p>
<h4>JavaScript example:</h4>
<p><img src="http://f6design.com/journal/wp-content/uploads/2010/09/sunset_theme_js.png" alt="Sunset theme for phpDesigner - JavaScript code" width="450" height="258" /></p>
<p>I&#8217;ve named my theme Sunset, and it is inspired by the <a href="http://alexgorbatchev.com/SyntaxHighlighter/manual/themes/midnight.html">Midnight theme</a> for <a href="http://alexgorbatchev.com/SyntaxHighlighter/">SyntaxHighlighter</a>. If any phpDesigner fans are looking for a light-on-dark color scheme to spruce up their code editor, perhaps Sunset will fit the bill.</p>
<h3>Download</h3>
<p><a href="http://www.f6design.com/projects/f6-sunset-phpd-theme/f6_sunset_phpd_theme_1.2.rar">Download Sunset theme for phpDesigner</a></p>
<p>Installation and uninstallation instructions are included with the theme. Currently the theme has syntax highlighting colors for the four languages I work with: HTML, CSS, JavaScript and PHP.</p>
<h3>Important</h3>
<p>There is currently a <a href="http://www.facebook.com/topic.php?topic=12989&#038;post=148620&#038;uid=108672675347">bug in phpDesigner</a> that sometimes causes the &#8216;separator&#8217; colors to revert to their defaults (e.g. the color of <code>&lt;?php ?&gt;</code> tags reverts to black). The only sure-fire way to get things back to normal is to open the phpDesigner preferences dialog, and click &#8216;OK&#8217;. You might also try closing all your open documents and restarting the application. Hopefully this bug will be fixed in a future version of phpDesigner.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2010/09/29/sunset-a-syntax-highlighting-theme-for-phpdesigner/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>The Email Standards Project&#8217;s message to Microsoft: Outlook&#8217;s broken &#8211; Let&#8217;s fix it.</title>
		<link>http://f6design.com/journal/2009/06/24/the-email-standards-projects-message-to-microsoft-outlooks-broken-lets-fix-it/</link>
		<comments>http://f6design.com/journal/2009/06/24/the-email-standards-projects-message-to-microsoft-outlooks-broken-lets-fix-it/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 00:30:18 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[HTML/XHTML]]></category>
		<category><![CDATA[News & Reviews]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=436</guid>
		<description><![CDATA[Microsoft have announced that Outlook 2010 will use the crippled Word rendering engine to display HTML emails (as does Outlook 2007). In response The Email Standards Project have launched a campaign to send a clear message to Microsoft: Outlook&#8217;s broken &#8211; Lets fix it. The campaign leveredges Twitter to rally the web design community around [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft have announced that Outlook 2010 will use the crippled Word rendering engine to display HTML emails (as does Outlook 2007). In response <a href="http://www.email-standards.org/">The Email Standards Project</a> have launched a <a href="http://fixoutlook.org/">campaign</a> to send a clear message to Microsoft: Outlook&#8217;s broken &#8211; Lets fix it.</p>
<p><img src="http://f6design.com/journal/wp-content/uploads/2009/06/fixit.jpg" alt="fixit" title="fixit" width="450" height="363" class="contentImg matte" /></p>
<p>The campaign leveredges Twitter to rally the web design community around the issue, and a realtime mosaic of the tweets can be viewed at <a href="http://fixoutlook.org/">fixoutlook.org</a>. The site is worth a visit for this feature alone!</p>
<h3>Further reading</h3>
<p><a href="http://www.campaignmonitor.com/blog/post/2799/microsoft-to-ignore-web-standards-in-outlook-2010/">Microsoft to ignore web standards in Outlook 2010 &#8211; enough is enough</a></p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2009/06/24/the-email-standards-projects-message-to-microsoft-outlooks-broken-lets-fix-it/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IE7, first-child and HTML comments</title>
		<link>http://f6design.com/journal/2008/11/27/ie7-first-child-and-html-comments/</link>
		<comments>http://f6design.com/journal/2008/11/27/ie7-first-child-and-html-comments/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 05:58:04 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML/XHTML]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/2008/11/27/ie7-first-child-and-html-comments/</guid>
		<description><![CDATA[Perhaps it is common knowledge, but until today I was unaware that the CSS first-child pseudo-class fails in IE7 when the child element is immediately preceeded by an HTML comment. In the following example IE7 considers the HTML comment to be the first child, and therefore my selector will fail. CSS: li:first-child { font-weight:bold; } [...]]]></description>
			<content:encoded><![CDATA[<p>Perhaps it is common knowledge, but until today I was unaware that the CSS <code>first-child</code> pseudo-class fails in IE7 when the child element is immediately preceeded by an HTML comment.</p>
<p>In the following example IE7 considers the HTML comment to be the first child, and therefore my selector will fail.</p>
<p><strong>CSS:</strong></p>
<pre><code>li:first-child { font-weight:bold; }</code></pre>
<p><strong>HTML:</strong></p>
<pre><code>&lt;ul&gt;
    &lt;!-- IE7 thinks this comment is the first child. Oops! --&gt;
    &lt;li&gt;The li:first-child selector should make me bold&lt;/li&gt;
    &lt;li&gt;I'm the second child&lt;/li&gt;
    &lt;li&gt;I'm the third child&lt;/li&gt;
&lt;/ul&gt;</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2008/11/27/ie7-first-child-and-html-comments/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Semantic HTML 5? Pfft.</title>
		<link>http://f6design.com/journal/2007/12/04/semantic-html-5-pfft/</link>
		<comments>http://f6design.com/journal/2007/12/04/semantic-html-5-pfft/#comments</comments>
		<pubDate>Wed, 05 Dec 2007 06:43:19 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[HTML/XHTML]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/2007/12/04/semantic-html-5-pfft/</guid>
		<description><![CDATA[Reading though a preview of the HTML 5 specification over at A List Apart, I was somewhat surprised by the names chosen for two new HTML elements: header and footer. Like many other standards aware web designers I have worked hard to train myself out of the habit of naming divs non-semantically, only to discover [...]]]></description>
			<content:encoded><![CDATA[<p>Reading though a preview of the HTML 5 specification over at <a href="http://www.alistapart.com/articles/previewofhtml5">A List Apart</a>, I was somewhat surprised by the names chosen for two new HTML elements: <code>header</code> and <code>footer</code>. Like many other standards aware web designers I have worked hard to train myself out of the habit of naming divs non-semantically, only to discover that HTML 5 will undo all of my good work.</p>
<p>Let me explain what I mean.</p>
<p>Instead of naming a <code>div</code> based on where it appears within my layout, I try to name it based on the content it describes. For example, rather than markup a site&#8217;s header as:</p>
<pre><code>&lt;div id="header"&gt;</code></pre>
<p>I mark it up as:</p>
<pre><code>&lt;div id="branding"&gt;</code></pre>
<p>and instead of:</p>
<pre><code>&lt;div id="footer"&gt;</code></pre>
<p>I choose:</p>
<pre><code>&lt;div id="siteinfo"&gt;</code></pre>
<p>The idea is that in the absence of meaningful, semantic HTML elements with which to markup content I use the most descriptive CSS id name I can think of.</p>
<p>How ironic then, that the new HTML 5 <code>header</code> and <code>footer</code> elements describe content based on where it appears on the page, rather than what it <em>means</em>.</p>
<p><strong>Update 08 Dec 2007:</strong> I thought it was worth mentioning that the branding/siteinfo naming structure isn&#8217;t one I came up with myself &#8211; it is suggested by Andy Clarke in his book Transcending CSS.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2007/12/04/semantic-html-5-pfft/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>The trouble with content management systems</title>
		<link>http://f6design.com/journal/2007/11/30/the-trouble-with-content-management-systems/</link>
		<comments>http://f6design.com/journal/2007/11/30/the-trouble-with-content-management-systems/#comments</comments>
		<pubDate>Fri, 30 Nov 2007 21:14:13 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[HTML/XHTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/2007/11/30/the-trouble-with-content-management-systems/</guid>
		<description><![CDATA[When I started out as a web designer, content management systems belonged strictly to the realm of big budget websites. For everyone else, it was perfectly normal for a web designer to manually update a site whenever a change needed to be made. Clients didn&#8217;t expect a CMS to be included with their website, and [...]]]></description>
			<content:encoded><![CDATA[<p>When I started out as a web designer, content management systems belonged strictly to the realm of big budget websites. For everyone else, it was perfectly normal for a web designer to manually update a site whenever a change needed to be made. Clients didn&#8217;t expect a CMS to be included with their website, and web designers didn&#8217;t offer the option. Times have certainly changed, and in an age of blogs, Facebook, and MySpace, clients expect to be able to take control of their website&#8217;s content.</p>
<p>For most web designers, especially those who work solo, a custom built content management system is still a tall order. Fortunately there are numerous commercial and open source content management systems available, which offer a practical and affordable means of wrangling content. However, a &#8220;one size fits all&#8221; content management system that doesn&#8217;t address a site&#8217;s specific content requirements can introduce as many problems as it solves.</p>
<h3>One page, one blob</h3>
<p>The easier a content management system (CMS) is to configure and use, the more restrictive it is likely to be. HTML and CSS offer a rich toolset for describing and presenting all kinds of content, yet most CMSs cannot be configured to address the myriad types of content a content editor needs to display. Instead, the content editor is given the ability to modify just one &#8220;blob&#8221; of content per webpage. This format suits the majority of webpages, but assumes that the content editor is happy to have just one block of plain text per page, or that they are comfortable styling text with regular HTML tags, or a &#8216;simplified&#8217; variation such as <a href="http://daringfireball.net/projects/markdown/">markdown</a>. For the novice, HTML is hardly child&#8217;s play, and trusting a client to write compliant markup is optimistic to say the least. That&#8217;s where WYSIWYG (What You See Is What You Get, pronounced &#8220;wizzywig&#8221;) editors come to the rescue, and that&#8217;s when problems start to creep in.</p>
<h3>The WYSIWYG problem</h3>
<p>The WYSIWYG editor is at the heart of most modern content management systems, if not by design, then because web designers install one themselves. They are used as a &#8220;cure all&#8221; by CMS developers and web designers alike, because they provide content editors with a powerful interface for styling content, using a toolset that replicates the desktop word processors with which they are already familiar. The two most popular WYSIWG editors are <a href="http://tinymce.moxiecode.com/">TinyMCE</a> and <a href="http://www.fckeditor.net/">FCKEditor</a>. Both use Javascript to enhance a regular HTML textarea, and do so via a menu of buttons similar to that found in Microsoft Word. This probably sounds ideal &#8211; a website&#8217;s content editor can take total ownership of their content, styling it in any way they please. But content editors are precisely that: editors. They are not designers, and shouldn&#8217;t have to &#8211; or be <em>allowed</em> to &#8211; make decisions that affect the design of their content. Sadly, this is exactly the power that WYSIWYG editors put at their fingertips.</p>
<p><img class="contentImg matte" src='http://f6design.com/journal/wp-content/uploads/2007/11/tinymce.jpg' alt='Tinymce' /></p>
<p class="caption">Tinymce in all its glory. Watch your client destroy your layout in mere seconds!</p>
<p>Let loose with a WYSIWYG editor a content editor can mix and match font size, face and color, and even add tables, images, background colors, and emoticons to a webpage. If you think they will have the self control to exercise restraint, think again. Even the ability to alter the appearance of text can have disastrous results. I have seen a content editor use a WYSIWG editor to set body copy in 16 point, 12 point, and 10 point at various places on the same page, and in three different typefaces. Another client inexplicably changed the color of list items to exactly the same blue used throughout the site to indicate hyperlinks. The impact such misguided decisions have on usability and design should be obvious.</p>
<p>Of course the blame doesn&#8217;t lie with the content editor. They don&#8217;t have training as a graphic designer, nor can we expect them  to grasp the subtleties of interactive design. The problem is that WYSIWYG editors mix the <em>description</em> of content (headings, lists, blockquotes) with its <em>design</em> (typefaces, colors, and point sizes). Web designers have long understood the importance of separating content from presentation, but WYSIWYG editors snatch that separation away from us.</p>
<h3>Dial it back</h3>
<p>Fortunately, most WYSIWYG editors allow you to limit their functionality to suit your needs. This can either be done using a CMS&#8217;s administration interface, or by editing a configuration file. When faced with a WYSIWYG editor I dial its functionality right back, leaving only the core set of tools needed to effectively describe content. Does a content editor need to specify background colors for text? Of course not. The size of text? Nope. Paragraph alignment? Uh-uh. Tables? Lets not even go there. I don&#8217;t even let a content editor underline text. Why? Because underlined text looks like a link.</p>
<p>Headings (h1, h2 etc), bold, italic, ordered lists, unordered lists, blockquotes, and hyperlinks: these should provide sufficient scope to describe most types of content. Let your regular CSS stylesheets style the output, and you&#8217;ll ensure the rendered content fits seamlessly with your existing website layout.</p>
<h3>The copy and paste problem</h3>
<p>WYSIWYG editors present another problem I haven&#8217;t touched on yet. Usually a website&#8217;s copy isn&#8217;t typed directly into a content management system, it is composed in a word processor, then pasted into the CMS. When this happens the formatting of the source text is brought across too, warts and all. Despite your best efforts to limit your client&#8217;s ability to style content, with one keystroke they can inadvertently bypass your safeguards. There are two solutions to this problem. The first involves education. Both FCKEditor and TinyMCE include a &#8216;paste as plain text&#8217; button, that gives users the option of stripping all formatting from text as it is pasted into the WYSIWYG editor. The only problem is that your client needs to remember to use the button. The second option is more pro-active. Both FCKEditor and TinyMCE have a configuration setting that forces content to be pasted as plain text.</p>
<h3>What about web standards?</h3>
<p>A criticism often leveled at WYSIWYG editors is that they produce spaghetti code. In part, this is true. The only way a WYSIWYG editor can define the color of text, for instance, is by applying an inline style to your markup. But if you limit the WYSIWYG to a few core capabilities, as I suggested above, there is far less that can go wrong. The developers of WSIWYG editors are mindful of the need for standards compliance, and I have found that in most cases it isn&#8217;t hard to get both TinyMCE and FCKEditor to generate tidy markup.</p>
<h3>Other options</h3>
<p>Building a CMS from scratch is a huge task. I ought to know &#8211; most of my websites are powered by a CMS I built myself. Unless you are a competent programmer and have a heap of time up your sleeve (or just enjoy a challenge!), building your own CMS isn&#8217;t an option I would recommend lightly, but the advantages of the DIY route certainly pay off in the long run.</p>
<p>Building your own CMS gives you absolute control over how the software functions, allowing you to customize it to your own needs with fine grained control. When something breaks, you know how to fix it. If you want to add a new feature to the CMS, you just go ahead and add it, rather than submitting a feature request to the software vendor and crossing your fingers.</p>
<p>Another option to consider is <a href="http://xstandard.com/">XStandard</a>, a WYSIWYG editor that touts its standards compliance and accessibility features. The big drawback I can see with XStandard is that it requires the content editor to install the XStandard application on their local machine. By contrast, a javascript based WYSIWYG editor makes your website editable from any computer sporting a modern web browser.</p>
<p>Whichever approach you take to content management, so long as you give careful thought to both your client&#8217;s needs and the pitfalls of giving them free rein, it is possible to strike a balance that keeps everyone happy. Giving clients the ability to edit their website&#8217;s content, and creating beautiful, standards compliant websites needn&#8217;t be mutually exclusive goals.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2007/11/30/the-trouble-with-content-management-systems/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Validation: a pragmatic approach</title>
		<link>http://f6design.com/journal/2007/03/31/validation-a-pragmatic-approach/</link>
		<comments>http://f6design.com/journal/2007/03/31/validation-a-pragmatic-approach/#comments</comments>
		<pubDate>Sat, 31 Mar 2007 10:52:01 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[HTML/XHTML]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/2007/03/31/validation-a-pragmatic-approach/</guid>
		<description><![CDATA[Recently the web standards debate has taken an interesting turn, with many standards advocates re-evaluating the role of validation in their daily practice. Most recently Ethan Marcotte contributed an article titled Where Our Standards Went Wrong to A List Apart. Marcotte concluded that validation is still a vital part of any web development project, but [...]]]></description>
			<content:encoded><![CDATA[<p>Recently the web standards debate has taken an interesting turn, with many standards advocates re-evaluating the role of validation in their daily practice. Most recently Ethan Marcotte contributed an article titled <a href="http://alistapart.com/articles/whereourstandardswentwrong">Where Our Standards Went Wrong</a> to A List Apart. Marcotte concluded that validation is still a vital part of any web development project, but the fact that the opposite side of the argument was given serious consideration is significant. Consider the viewpoint of <a href="http://stopdesign.com/">Douglas Bowman</a>, quoted in Marcotte&#8217;s article:</p>
<blockquote><p>Validation is something I only do on my own work now.</p></blockquote>
<p>Bowman was part of the team responsible for the 2002 redesign of <a href="http://www.wired.com/">Wired News</a> using web standards and CSS. Wired News was one of the first major standards compliant sites, and helped pave the way for the web standards revolution. So for Bowman to state that validation of client websites is no longer an important consideration is quite an eye opener.</p>
<p>What designers like Bowman advocate is a pragmatic approach to web standards, an acknowledgment that validation is not practical in every situation. Non-compliant Content Management Systems and authoring tools, multi-developer teams and (let&#8217;s face it) poor attention to detail can all result in the production of invalid markup. When balancing the benefits of standards compliant markup against the time and cost required to overcome these obstacles, sometimes compliance is going to lose out.</p>
<p>I personally believe that web standards should be a cornerstone of any modern web design project. However, I also understand that given a limited timeframe and budget in which to produce a website, a certain level of compromise is sometimes inevitable, and perfectly acceptable. Consider the following common validation slip ups:</p>
<ul>
<li>Images missing an <code>alt</code> attribute</li>
<li>Unencoded ampersands</li>
<li>Empty <code>&lt;p&gt;&lt;/p&gt;</code> or <code>&lt;div&gt;&lt;/div&gt;</code> elements</li>
<li>Uppercase XHTML tag and attribute names</li>
</ul>
<p>All of these oversights will result in XHTML validation warnings or errors, but presently will not impact on the way a document renders or functions in a web browser. Neither do I expect these errors will cause significant problems in future browsers &#8211; I find it hard to imagine a web browser refusing to display a page simply because it contains an empty paragraph element.</p>
<p>Certainly if I notice any such errors during the development of a site I fix them straight away. However if I identify the errors at a later date, or they creep into the site during a content update, then I question the importance of correcting them immediately. In the past I would have dropped whatever I was doing and rushed to squash the offensive (but invisible) validation error, almost as a matter of personal pride. Today I am more inclined to add it to my to-do list for the next occasion I&#8217;m working on the site. In the meantime I know that both my client and the site&#8217;s user base will be totally oblivious to the &#8216;problem&#8217;.</p>
<p>In this discussion it is important not to lose sight of the benefits that standards based design undoubtedly brings to our workflow. Quicker development cycles, faster loading pages, simpler site redesigns, and improved search engine visibility are just some of the <a href="http://webstandards.org/learn/faq/">gains to be had by producing semantic and standards compliant documents</a>. But our job as web designers is not merely to produce sites that adhere to the standards of our industry. There are also technical, budgetary and timeframe requirements to be factored in. By taking a pragmatic approach to validation it is possible to meet these demands without abandoning our commitment to web standards.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2007/03/31/validation-a-pragmatic-approach/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>When spacer gifs go bad</title>
		<link>http://f6design.com/journal/2007/01/23/when-spacer-gifs-go-bad/</link>
		<comments>http://f6design.com/journal/2007/01/23/when-spacer-gifs-go-bad/#comments</comments>
		<pubDate>Tue, 23 Jan 2007 11:55:08 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[HTML/XHTML]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/2007/01/23/when-spacer-gifs-go-bad/</guid>
		<description><![CDATA[It&#8217;s a while since I gave any thought to spacer gifs, but I was looking at the Exxon website tonight (as you do on a Tuesday evening) and saw something that made me chuckle. I was viewing the site in Firefox (of course), and noticed that on many pages the text &#8220;spacer.gif&#8221; appeared prominently within [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a while since I gave any thought to spacer gifs, but I was looking at the Exxon website tonight (as you do on a Tuesday evening) and saw something that made me chuckle. I was viewing the site in Firefox (of course), and noticed that on <a href="http://www.exxonmobil.com/Corporate/Citizenship/citizenship.asp">many pages</a> the text &#8220;spacer.gif&#8221; appeared prominently within the layout.</p>
<p><img class="contentImg" src="http://f6design.com/journal/wp-content/uploads/2007/01/exxon_spacer_gif_screenshot.gif" alt="Exxon spacer gif screenshot" /></p>
<p>Now, it&#8217;s not too surprising that a website designed a few years back makes liberal use of tables and transparent spacer gifs for layout, but inexplicably all of the gifs have been given an <code>img</code> <code>alt</code> attribute of &#8211; you guessed it &#8211; &#8220;spacer.gif&#8221;. By itself this won&#8217;t cause display problems, but the <code>href</code> provided for the spacer gifs is also incorrect, meaning that the browser is unable to display the images. In combination these boo-boos cause Firefox to render the image <code>alt</code> values on screen, messing up an otherwise clean layout.</p>
<p>I&#8217;m surprised no one who works on the Exxon website has noticed this problem. I guess they all use Internet Explorer over there.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2007/01/23/when-spacer-gifs-go-bad/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Microsoft drop the ball with Outlook 2007</title>
		<link>http://f6design.com/journal/2007/01/10/microsoft-drops-the-ball-with-outlook-2007/</link>
		<comments>http://f6design.com/journal/2007/01/10/microsoft-drops-the-ball-with-outlook-2007/#comments</comments>
		<pubDate>Wed, 10 Jan 2007 21:17:09 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML/XHTML]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/2007/01/10/microsoft-drops-the-ball-with-outlook-2007/</guid>
		<description><![CDATA[Well it looks as if Microsoft has screwed up royally with Outlook 2007, at least insofar as the way HTML emails are rendered. Instead of using the not-too-shabby Internet Explorer 7 rendering engine to display HTML emails, Microsoft opted to use a customized version of the Word 2007 rendering engine. That&#8217;s right, from now on [...]]]></description>
			<content:encoded><![CDATA[<p>Well it looks as if Microsoft has screwed up royally with Outlook 2007, at least insofar as the way HTML emails are rendered. Instead of using the not-too-shabby Internet Explorer 7 rendering engine to display HTML emails, Microsoft opted to use a customized version of the Word 2007 rendering engine. That&#8217;s right, from now on your beautifully constructed HTML newsletters are going to be rendered by the crime against layout known as Microsoft Word. That fact alone was enough to send shivers down my spine, but when I dug a little deeper I discovered just how dire the situation really is.</p>
<p>Until now, Outlook has stood its ground as one of the better email clients when it comes to rendering HTML. Sure, there wasn&#8217;t perfect parity between Outlook and Internet Explorer, but it was close enough to make do. However, with the switch to the Word rendering engine Outlook has taken a leap back into the dark ages, and now ranks somewhere alongside Lotus Notes and Eudora in terms of its rendering capabilities.</p>
<p>Here are a few of the significant HTML and CSS goodies you&#8217;re going to have to kiss goodbye: </p>
<ul>
<li><strong>Background images</strong><br />
Want a background image on that table cell or div? Forget about it friend, you have to make do with solid colors from now on.</li>
<li><strong>Floats</strong><br />
Just when HTML email designers were tentatively proclaiming that CSS layouts were achievable, Microsoft have decided to rain on our parade.</li>
<li><strong>Flash</strong><br />
Your recipients are just going to see a &#8220;red x&#8221; where the Flash movie would have been.</li>
</ul>
<p>And that’s just the tip of the iceberg &#8211; you can see a <a href="http://msdn2.microsoft.com/en-us/library/aa338201.aspx">complete list</a> of the missing HTML/CSS elements, properties and attributes on the MSDN site.</p>
<p>None of these limitations is going to make the task of designing HTML emails impossible, but they will ensure that no advances are made in this field for a good number of years. Remember, it&#8217;s been four years since the last version of Outlook was released, so I&#8217;m going to guess it&#8217;ll be at <em>least </em>six years before Outlook 2007 drops off the edge of the map.</p>
<p>Microsoft are claiming that enhanced security is behind the decision, which seems odd considering how they keep harping on about <a href="http://www.microsoft.com/technet/community/columns/secmgmt/sm0306.mspx">how secure Internet Explorer 7</a> is compared to its predecessor. And as usual it&#8217;s the web designers &#8211; and consumers &#8211; who get shafted. Hopefully when Microsoft&#8217;s customer base realize how crappy their HTML newsletters now look, they will start consider alternative email clients such as Thunderbird. Maybe then Microsoft will realize how shortsighted they have been.</p>
<h3>Further reading</h3>
<h4><a href="http://joe.hardy.id.au/blog/2006/11/21/broken-html-rendering-in-outlook-2007/">Broken HTML/CSS Rendering in Outlook 2007</a></h4>
<p>Joe Hardy has an excellent gripe about the situation, and details some of the specific problems you might encounter when designing HTML emails for Outlook 2007.</p>
<h4><a href="http://msdn2.microsoft.com/en-us/library/aa338201.aspx">Word 2007 HTML and CSS Rendering Capabilities in Outlook 2007</a></h4>
<p>Straight from the horse&#8217;s mouth.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2007/01/10/microsoft-drops-the-ball-with-outlook-2007/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

