<?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>CoffeePowered &#187; Tips and tricks</title>
	<atom:link href="http://coffeepowered.co.uk/category/tips-and-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://coffeepowered.co.uk</link>
	<description>The online ramblings of Paul Stanton</description>
	<lastBuildDate>Wed, 30 Jun 2010 19:46:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>An analogy for progressive enhancement</title>
		<link>http://coffeepowered.co.uk/2010/02/an-analogy-for-progressive-enhancement/</link>
		<comments>http://coffeepowered.co.uk/2010/02/an-analogy-for-progressive-enhancement/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 09:07:41 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[p52]]></category>
		<category><![CDATA[analogy]]></category>
		<category><![CDATA[progressive enhancement]]></category>
		<category><![CDATA[sales]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/?p=455</guid>
		<description><![CDATA[As a designer I often have to explain the concept of progressive enhancement and graceful degradation to clients to try and explain why their site doesn&#8217;t look the same in every browser. Selling concepts I endured a misspent youth in retail sales and one of the things I&#8217;m good at is finding the best way [...]]]></description>
			<content:encoded><![CDATA[<p>As a designer I often have to explain the concept of progressive enhancement and graceful degradation to clients to try and explain why their site doesn&#8217;t look the same in every browser.</p>
<h3>Selling concepts</h3>
<p>I endured a misspent youth in retail sales and one of the things I&#8217;m good at is finding the best way to sell things to clients, even if it&#8217;s a concept like progressive enhancement rather than a physical product, the concept can be &#8216;sold&#8217; in a way that the client understands and, more importantly, accepts.</p>
<p>Let&#8217;s start with the definition from Wikipedia:</p>
<blockquote><p>Progressive enhancement is a strategy for web design that emphasizes accessibility, semantic mark-up, and external stylesheet and scripting technologies. Progressive enhancement uses web technologies in a layered fashion that allows everyone to access the basic content and functionality of a web page, using any browser or Internet connection, while also providing those with better bandwidth or more advanced browser software an enhanced version of the page.<br /><cite><a href="http://en.wikipedia.org/wiki/Progressive_enhancement">Wikipedia</a></cite></p></blockquote>
<p>While this is a clear and concise definition it does assume a certain level of knowledge and so isn&#8217;t the most ideal method to explain the concept to clients.</p>
<p>I tend to use analogies to explain a lot of things to people, taking something that may be alien to them, such as the differing capabilities of web browsers, and use something they may be familiar with to explain the point. My favourite analogy uses games consoles as a replacement for web browsers.</p>
<h3>my favourite analogy</h3>
<p>So let’s take a popular sports game, Say &#8216;Tiger Woods Golf&#8217;, this game is available on just about every popular games console on the market such as the Nintendo Wii, Xbox 360 and Playstation 3 as well as handheld consoles such as the Nintendo DS, does the game look the same on each console? Absolutely not! It&#8217;s physically impossible and there&#8217;s a clear and defined difference with games consoles, the &#8216;high-end&#8217; consoles like the 360 and PS3 cost the most, and undoubtedly give the best visual representation of the game, with better textures, realistic faces, perfect trees and water effects but the Nintendo Wii, having less power will have blockier graphics, jagged edges and rougher details like trees and water. The games don&#8217;t look exactly the same, but the most important thing is that &mdash; despite these obvious visual differences &mdash; it doesn&#8217;t stop you playing a round of golf.</p>
<p><img src="http://coffeepowered.co.uk/wp-content/uploads/2010/02/tigerwoodsyall.jpg" /><br />
Image showing the difference between the game on the Wii (left) and the 360 (right)</p>
<p>Every client I&#8217;ve ever explained this to has understood the analogy really well. Nearly all own, or have owned games consoles or have children with them and so can understand that a £300 console might give a better overall experience than a £150 console, even if the game costs the same. The game is designed to take advantage of the increased power available in high end machines, and cut back on certain things on low end machines to make sure that you can still do the core task in the game. Everyone will remember owning an older system when they were younger and wouldn&#8217;t expect their Atari, NES or Master System to be able to cope with the latest video games on the market, but they could still get a game that would let them play a round of golf. Even if the balls are square.</p>
<h3>the &#8216;convincers&#8217;</h3>
<p>There&#8217;s a couple of conscious decisions here which help to &#8216;sell&#8217; the analogy, Firstly: games such as Tiger Woods Golf, Fifa Football or Formula 1 are extremely widespread and mainstream, you can be sure that even if your audience isn&#8217;t familiar with a specific game, they know the sport. You can tailor the analogy on-the-fly with the client also, if you know they&#8217;re a football fan, switch to Fifa Football as your reference.</p>
<p>Secondly: I use a sports game as they&#8217;re the most likely to be ported across all major consoles and contain familiar elements which stay consistent regardless of the platform, such as golf courses, race tracks or sports stadiums. It&#8217;s the graphical detail that is the major difference and this is what we&#8217;re using to compare.</p>
<p>Thirdly: sports games attract huge investment and sponsorship and sell and make millions. This helps to sell the fact that even EA Sports, with their millions of dollars can make a game look the same across every console.</p>
<h3>what about you?</h3>
<p>Do you have a favourite analogy? what do you use to explain certain things to clients? It doesn&#8217;t have to be progressive enhancement, hit up the comment box below and let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2010/02/an-analogy-for-progressive-enhancement/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Using PHP&#8217;s alternate syntaxes</title>
		<link>http://coffeepowered.co.uk/2010/01/using-phps-alternate-syntaxes-to-aid-code-readability/</link>
		<comments>http://coffeepowered.co.uk/2010/01/using-phps-alternate-syntaxes-to-aid-code-readability/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 08:00:57 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[p52]]></category>
		<category><![CDATA[control structures]]></category>
		<category><![CDATA[elseif]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[syntax]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/?p=348</guid>
		<description><![CDATA[If you&#8217;ve ever worked with PHP you&#8217;ll be more than familiar with the use of if/elseif/else conditional statements, these statements often become large and unweildy, especially when HTML is mixed in with PHP, causing a problems with code readability. There are a couple of alternate ways to write these statements which can improve your code. [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever worked with PHP you&#8217;ll be more than familiar with the use of if/elseif/else conditional statements, these statements often become large and unweildy, especially when HTML is mixed in with PHP, causing a problems with code readability. There are a couple of alternate ways to write these statements which can improve your code.</p>
<h3>if..endif syntax</h3>
<p>We&#8217;ll start with a simple example of a &#8216;regular&#8217; statement which includes a foreach and an if statement which is extremely common among PHP scripts.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$array_expression</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$expression1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Result1'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Result2'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span> <br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>Now, just for funzies, let&#8217;s make this a tiny bit more complex and mix in some HTML markup in there for good measure, just like you&#8217;d see in, say, a WordPress template where we&#8217;re jumping back and forth between HTML and PHP mode.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$array_expression</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$expression1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;Result1&lt;/p&gt;<br />
<span style="color: #000000; font-weight: bold;">&lt;?</span> &nbsp;<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;Result2&lt;/p&gt; <br />
<span style="color: #000000; font-weight: bold;">&lt;?</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span> <br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>See the closing braces on lines 9 &#038; 10? With a relatively small example like this you can scan back through the code to see wether they close the if or the elseif. Now imagine a much larger statement, the only way to find out what the closing brace actually closes is to either pay attention to the tab levels (providing the tab levels have been maintained properly), or to read back through the whole statement and match them up. There is an alternate syntax which makes life a little easier. </p>
<h4>Alternate syntax</h4>
<p>By using the alternate if..elseif syntax we can replace those closing braces with something a little more useful.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$array_expression</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$expression1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;Result1&lt;/p&gt;<br />
<span style="color: #000000; font-weight: bold;">&lt;?</span> &nbsp;<span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;Result2&lt;/p&gt; <br />
<span style="color: #000000; font-weight: bold;">&lt;?</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>This alternate syntax is expecially useful when mixing PHP and HTML and works for <strong>if/while/for</strong> control structures.</p>
<h3>Ternary operator</h3>
<p>For simple evaluations you can use the ternary operator which is a slimline version of an if/else statement, for example, the following statement which pluralises a string based on an integer variable.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$count</span> <span style="color: #339933;">==</span> 1<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$comments</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'comment'</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$comments</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'comments'</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$count</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$comments</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<h4>Alternate syntax</h4>
<p>Using the ternary operator this can be condensed to a single line:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #000088;">$comments</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$count</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'comment'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">'comments'</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$count</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$comments</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<h3>Have a try!</h3>
<p>By learning and adopting these alternate syntaxes you will ensure that your code remains readable and maintainable, especially if you&#8217;re writing code to be used by other people. Give them a try!</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2010/01/using-phps-alternate-syntaxes-to-aid-code-readability/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CSS coding standards</title>
		<link>http://coffeepowered.co.uk/2010/01/css-coding-standards/</link>
		<comments>http://coffeepowered.co.uk/2010/01/css-coding-standards/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 20:04:58 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[p52]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[maintainable css]]></category>
		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/blog/?p=182</guid>
		<description><![CDATA[Well, it&#8217;s now 2010 and as usual, January brings with it many self-made promises and resolutions, one of mine is to write more, even if it&#8217;s just quick tips &#038; tricks rather than lengthy diatribes which I always want to write, but never seem to find the time. During the back end of last year [...]]]></description>
			<content:encoded><![CDATA[<p>Well, it&#8217;s now 2010 and as usual, January brings with it many self-made promises and resolutions, one of mine is to write more, even if it&#8217;s just quick tips &#038; tricks rather than lengthy diatribes which I always want to write, but never seem to find the time.</p>
<p>During the back end of last year I started to experiment with one of the more boring aspects of CSS, but one of the most rewarding in the long-term: How I actually write, organise and maintain my CSS files. These are relatively minor tweaks, but I thought I&#8217;d share them in case anyone finds them useful.</p>
<p>I&#8217;d just like to note that these are my personal preferences, you may disagree entirely with the way I do things and that&#8217;s fine, feel free to drop a comment below if you&#8217;d like!</p>
<h3>Single vs. Multi-line</h3>
<p>So lets get this out of the way, I hate single line CSS rules, they&#8217;re a pain-in-the-ass to navigate and can cause problems with some source control tools which may only tell you which line has changed and not which property has changed specifically or when running your code through the validator and getting errors which refer to specific line numbers as well as times when you might not have syntax highlighting to help you quickly visually identify properties and values (such as viewing CSS in Firebug).</p>
<p>I&#8217;ve never written my CSS rules as single-line and I doubt I&#8217;ll ever start.</p>
<h3>Ordering of declarations</h3>
<p>One of my most common bugbears is with the ordering of declarations, a lot of the CSS files I come across in my &#8216;day job&#8217; are simply not ordered in any meaningful way, some have a semblance of ordering based on the personal preferences of the designer and may have width &#038; height rules together, floats and positions together for example, this always differs from designer to designer.</p>
<p>The best way to order declarations is alphabetically, it makes it far easier to scan through and visually locate a specific declaration, especially in large rules. Also, for teams of multiple designers it&#8217;s far easier to add declarations to an existing rule as they simply slot in alphabetically.</p>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ul<span style="color: #cc00cc;">#nav_primary</span> li a <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#999</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.2em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span>0 <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span><span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p></p>
<h3>Curly braces</h3>
<p>This might be one of those decisions where people think &#8220;Does that *really* matter?&#8221;, but I&#8217;ve started to place my closing brace on the same line as the last declaration. The reason behind this is to improve the visual distinction between rules which helps when scanning quickly through a large CSS document.</p>
<p>Previously, I&#8217;d place the closing brace on it&#8217;s own line, like this:</p>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">h1 <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">2em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.5em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span>0 0 <span style="color: #933;">18px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <br />
<span style="color: #00AA00;">&#125;</span><br />
h2 <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.333em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.125em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.125em</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <br />
<span style="color: #00AA00;">&#125;</span><br />
h3 <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.1667em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.2857em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.2857em</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p>
Now that the brace follows the last declaration it improves the spacing between rules, or course I could simply add another line after each rule, but that simply adds to the filesize and needlessly pads out the document. This method also places all of the selectors on their own tab level which helps when scanning through to locate a selector.</p>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">h1 <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">2em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.5em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span>0 0 <span style="color: #933;">18px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span><br />
<br />
h2 <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.333em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.125em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.125em</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span><br />
<br />
h3 <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.1667em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.2857em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.2857em</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p></p>
<h3>Closing semi-colon</h3>
<p>The closing semi-colon on the last declaration of a CSS rule is optional, while some people will no-doubt argue that dropping this will lead to smaller filesizes I&#8217;d always argue that long-term maintainability is more important, especially on larger projects with multiple developers or for projects which are handed to clients to maintain themselves.</p>
<p>By keeping the closing semi-colon in place anyone can quickly dive into the file and add rules without needing to worry about where the semi-colons are.</p>
<h3>Further reading</h3>
<p>I&#8217;ve only skimmed the surface of CSS coding standards to highlight some of the ways I like to do things, If you&#8217;re interested in making your CSS more readable, and especially more maintainable then I&#8217;d highly recommend you read the PDF version of this BarCamp presentation by Natalie Downe on <a href="http://natbat.net/2008/Sep/28/css-systems/">&#8220;CSS Systems for writing maintainable CSS&#8221;</a> which is a must-read and chock-full of excellent advice.</p>
<h3>What do you do?</h3>
<p>Do you have any personal preferences when it comes to writing your CSS? Feel free to hit the comment box below and let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2010/01/css-coding-standards/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Encouraging impulse purchases</title>
		<link>http://coffeepowered.co.uk/2009/10/encouraging-impulse-purchases/</link>
		<comments>http://coffeepowered.co.uk/2009/10/encouraging-impulse-purchases/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 12:55:16 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[impulse]]></category>
		<category><![CDATA[purchases]]></category>
		<category><![CDATA[retail]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/blog/?p=172</guid>
		<description><![CDATA[So I was in the City this weekend with my fiancée Natalie and we popped into La Senza to pick up an early Christmas present for Nat&#8217;s sister. While we were at the checkout I noticed that the cashiers were using a very effective technique for encouraging impulse purchases. La Senza offer a complimentary gift [...]]]></description>
			<content:encoded><![CDATA[<p>So I was in the City this weekend with my fiancée Natalie and we popped into La Senza to pick up an early Christmas present for Nat&#8217;s sister. While we were at the checkout I noticed that the cashiers were using a very effective technique for encouraging impulse purchases.</p>
<p>La Senza offer a complimentary gift wrapping service, and even if you don&#8217;t want a full blown gift box, they still take the time to wrap your purchases in a nice way. This gives them the time to have a quick chat with the customer and in our case, while the cashier was wrapping the set of PJ&#8217;s we&#8217;d picked and asked Nat if they were for her, she replied explaining that they were a Christmas present for her sister to which we were offered a gift box. While she was boxing them and chatting about how many people were doing their Christmas shopping early these days she dropped in &#8220;have you seen our fluffy bedsocks? we&#8217;ve got some in pink and brown which would go really well with these PJ&#8217;s&#8221; which prompted Nat to  go back into the store after her purchase to take a look at.</p>
<p>I&#8217;d also been listening in to the cashier next to us who did exactly the same, noticed what product the customer was purchasing and recommended a specific complimentary product of a relatively low value. This customer also went back into the store to take a look at the other product.</p>
<p>There&#8217;s lots of opportunities for brick &#038; mortar retail stores to passively encourage impulse buys, such as the common technique of having lots of low-value products near and around the checkout, but it was interesting to see the cashiers actively encouraging impulse purchases so effectively by suggesting products based on the customers purchase rather than lazily offering a single product-of-the-day type deal and I began to wonder how this could translate to e-commerce retailers.</p>
<p>It&#8217;s a common technique on e-commerce sites to offer matching products but more often than not these database driven lists aren&#8217;t very useful. When I purchased my netbook online I was presented with a selection of &#8220;You might also like&#8221; products, 2 of which were the same netbook in different colours. Other stores such as Amazon make great use of &#8220;Other customers also bought&#8230;&#8221; type lists which attempt to tap into common buyer preferences which undoubtedly works really well for companies like Amazon, but small retailers might benefit more by adopting this La Senza type approach by giving their customers a small selection of products which compliment their specific purchase and are of a low enough value to be treated as an impulse purchase.</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2009/10/encouraging-impulse-purchases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lose the snooze</title>
		<link>http://coffeepowered.co.uk/2009/08/lose-the-snooze/</link>
		<comments>http://coffeepowered.co.uk/2009/08/lose-the-snooze/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 07:17:16 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[alarm]]></category>
		<category><![CDATA[life hack]]></category>
		<category><![CDATA[life hacking]]></category>
		<category><![CDATA[snooze]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/blog/?p=109</guid>
		<description><![CDATA[I&#8217;m always up for a bit of &#8216;life hacking&#8217;, figuring out ways to get the most out of everday life and recently I&#8217;ve noticed I&#8217;ve been feeling extremely tired on a morning, almost fatigued and this feeling continues for most of the day. I get a decent amount of sleep, usually going to bed before [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m always up for a bit of &#8216;life hacking&#8217;, figuring out ways to get the most out of everday life and recently I&#8217;ve noticed I&#8217;ve been feeling extremely tired on a morning, almost fatigued and this feeling continues for most of the day.</p>
<div id="attachment_111" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.flickr.com/photos/h_is_for_home/2460111952/"><img src="http://coffeepowered.co.uk/wp-content/uploads/2009/08/2460111952_1e7f3f8eff.jpg" alt="Photo credit: H is for Home" title="2460111952_1e7f3f8eff" width="500" height="333" class="size-full wp-image-111" /></a><p class="wp-caption-text">Photo credit: H is for Home</p></div>
<p>I get a decent amount of sleep, usually going to bed before 11pm and &mdash; on a weekday &mdash; the alarm goes off at 6:15am when my fiancée wakes up to get ready for work and I normally hit the snooze button a couple of times and get out of bed around 6:30 to 6:45.</p>
<p>I&#8217;ve always thought that by using the snooze button, my body would wake up gradually and I&#8217;d be more awake by the time I got out of bed. My increasing daily tiredness has caused me to question this, and earlier this week I started forcing myself to get out of bed as soon as the 6:15 alarm goes off to see if it makes me feel more awake throughout the day.</p>
<p>So far, so good! Admittedly the inital jump out of bed is quite difficult as I&#8217;m prone to walking into the door in my half-asleep state, but I&#8217;ve found that the simple act of losing the snooze seems to work! I&#8217;m less tired during the day, more alert, focused and productive. Maybe you should give it a try!</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2009/08/lose-the-snooze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Printable logos</title>
		<link>http://coffeepowered.co.uk/2009/08/printable-logos/</link>
		<comments>http://coffeepowered.co.uk/2009/08/printable-logos/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 18:33:57 +0000</pubDate>
		<dc:creator>Stanton</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips and tricks]]></category>

		<guid isPermaLink="false">http://coffeepowered.co.uk/blog/?p=50</guid>
		<description><![CDATA[This is one of those tips where I think &#8220;surely everyone knows this already?&#8221; but it&#8217;s a solution to a problem that I found which was quite neat and I&#8217;ll use all the time from now on. When it comes to embedding a company logo into a page, quite often the logo won&#8217;t be suitable [...]]]></description>
			<content:encoded><![CDATA[<p>This is one of those tips where I think &#8220;surely everyone knows this already?&#8221; but it&#8217;s a solution to a problem that I found which was quite neat and I&#8217;ll use all the time from now on.</p>
<p>When it comes to embedding a company logo into a page, quite often the logo won&#8217;t be suitable for print. For example, the website may be dark and the logo might be light and while this works fine when the site is viewed on-screen, it can look out of place when used in a print stylesheet or if the site is viewed with CSS disabled.</p>
<p>While building the new University of Leeds corporate website we got to the stage where we needed to build our print stylesheet, the page header has a white logo on a dark background.</p>
<p>Originally, the logo was inserted into the design using a standard CSS image-replacement technique:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;logo&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h2</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.leeds.ac.uk&quot;</span>&gt;</span>University of Leeds<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h2</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></div></td></tr></tbody></table></div>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#logo</span> a <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">logo_black.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">53px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-indent</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-9999px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">184px</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<div id="attachment_59" class="wp-caption aligncenter" style="width: 510px"><img class="size-full wp-image-59" title="University of Leeds header" src="http://coffeepowered.co.uk/wp-content/uploads/2009/08/University-of-Leeds_1249982729324.png" alt="Light logo on dark header" width="500" height="272" /><p class="wp-caption-text">Light logo on dark header</p></div>
<p>When you&#8217;re using a CSS image replacement, the image doesn&#8217;t exist in the markup, it&#8217;s applied as a background image and only the h2 text is displayed. We toyed with the idea of using the same image replacement technique in our print.css, replacing the logo with the black-on-white variant. This quickly fell on it&#8217;s arse, as most browsers are set by default to not print background images as seen below.</p>
<div id="attachment_72" class="wp-caption aligncenter" style="width: 209px"><img class="size-full wp-image-72" title="University of Leeds - no logo - no css" src="http://coffeepowered.co.uk/wp-content/uploads/2009/08/universityofleeds_nologo_nocss.png" alt="Image replacement with CSS disabled" width="199" height="319" /><p class="wp-caption-text">Image replacement with CSS disabled</p></div>
<h3>Putting the image back into the markup</h3>
<p>In order to get around this, we decided to stop using image replacement and go back to having the image in the markup. Initially I was curious as to the effect of this from an SEO standpoint and had a quick chat with an <a href="http://thehodge.co.uk">SEO friend</a> about the disadvantage of not having our corporate logo as a heading. He pointed out that there would be no disadvantage to us as we&#8217;re not trying to rank on the &#8216;University of Leeds&#8217; as a keyword and that as it&#8217;s mentioned everywhere else in the thousands of pages we manage, it&#8217;s not going to make a difference. (Your mileage may vary and this might not be suitable for everyone)</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;logo&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;logo_black.png&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;University of Leeds logo&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></div></td></tr></tbody></table></div>
<h3>Doing it bass-ackwards</h3>
<p>Once we&#8217;d put the image back into the markup, it showed up as expected in our print stylesheet, however our white-on-black logo wasn&#8217;t really suited.</p>
<div id="attachment_63" class="wp-caption aligncenter" style="width: 209px"><img class="size-full wp-image-63" title="University of Leeds - CSS disabled" src="http://coffeepowered.co.uk/wp-content/uploads/2009/08/universityofleeds_dark_nocss1.png" alt="Same logo with CSS disabled" width="199" height="320" /><p class="wp-caption-text">Same logo with CSS disabled</p></div>
<p>We already knew that we couldn&#8217;t use CSS to replace this with the black-on-white logo in our print.css, so we decided to do it the other way round. Rather than the have the white-on-black logo as default, we changed to having the black-on white as the default meaning that our no-css and print.css got the correct logo. We used a &#8220;hidden&#8221; class so we could hide the default image and a CSS overlay on the anchor tag to bring back our white-on-black logo to fit in with the rest of the design.</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;logo&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.leeds.ac.uk&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;logo_white.png&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;University of Leeds logo&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></div></td></tr></tbody></table></div>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#logo</span> a <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">logo_black.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
.<span style="color: #993333;">hidden</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<div id="attachment_59" class="wp-caption aligncenter" style="width: 510px"><img class="size-full wp-image-59" title="University of Leeds header" src="http://coffeepowered.co.uk/wp-content/uploads/2009/08/University-of-Leeds_1249982729324.png" alt="Light logo on dark header" width="500" height="272" /><p class="wp-caption-text">CSS enabled</p></div>
<div id="attachment_61" class="wp-caption aligncenter" style="width: 209px"><img class="size-full wp-image-61" title="University of Leeds - No CSS" src="http://coffeepowered.co.uk/wp-content/uploads/2009/08/universityofleeds_nocss.png" alt="Black on white logo" width="199" height="320" /><p class="wp-caption-text">CSS disabled / print stylesheet</p></div>
<h3>Conclusion</h3>
<p>Because most browsers disable background images when printing by default, you need to be aware that any important images that are using image-replacement techniques may not work. Working around these limitations is possible with a bit of planning.</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeepowered.co.uk/2009/08/printable-logos/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
