<?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>Chris Contolini &#187; web dev</title>
	<atom:link href="http://contolini.com/category/web-dev/feed/" rel="self" type="application/rss+xml" />
	<link>http://contolini.com</link>
	<description></description>
	<lastBuildDate>Mon, 08 Mar 2010 08:49:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Things I&#8217;ve been doing all weekend(s)</title>
		<link>http://contolini.com/2009/10/09/things-ive-been-doing-all-weekends/</link>
		<comments>http://contolini.com/2009/10/09/things-ive-been-doing-all-weekends/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 10:38:57 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[me me me]]></category>
		<category><![CDATA[web dev]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[me]]></category>
		<category><![CDATA[ux]]></category>

		<guid isPermaLink="false">http://contolini.com/?p=559</guid>
		<description><![CDATA[I&#8217;ve burned some serious midnight oil these past few months on a couple side projects I recently launched. I also went camping at Big Sur two weeks ago. That was fun. But back to the web projects.
I created a philanthropic URL shortener to generate passive income for important organizations. It accepts Amazon.com URLs and appends [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve burned some serious midnight oil these past few months on a couple side projects I recently launched. I also went camping at <a title="Big Sur state park is rad" href="http://www.parks.ca.gov/?page_id=570">Big Sur</a> two weeks ago. That was fun. But back to the web projects.</p>
<p>I created a <a title="Amazon it! (Registering an Italian TLD was easier than I expected)" href="http://amzn.it">philanthropic URL shortener</a> to generate passive income for important organizations. It accepts Amazon.com URLs and appends the affiliate ID of a non-profit organization before shortening them. Anyone who follows the shortened link and buys something makes Amazon give ~ 4% of the order total to a non-profit org. The URL parser under the hood is super smart and fully ajaxed-out (while failing gracefully with javascript disabled). The goal of the site was to make it as simple and straightforward as possible to encourage people to use the service. It also generates <a title="Open Search protocol" href="http://www.opensearch.org">Open Search</a> browser plugins so Firefox and IE7+ users can replace their default Amazon search engine with a feel-good version.</p>
<p>I&#8217;ve been helping a <a title="Big Umbrella Studios and Gallery" href="http://bigumbrellastudios.com">local art gallery</a> increase their support base by building out a website. It sports a custom <a title="D-d-d-rupal" href="http://drupal.org">Drupal</a> theme and is stupidly easy to update. They shouldn&#8217;t have a hard time keeping their content fresh. The artist boxes on the homepage load in a random order on each page refresh to prevent sibling rivalry. Unfortunately, it makes caching impossible. :/</p>
<p>I spent all of half an hour setting up <a title="Gallery 2 is actually pretty crappy but it's cheap and easy!" href="http://gallery.menalto.com/">Gallery 2</a> at <a title="Where memes go to die" href="http://memedump.com">memedump.com</a>. It helps me keep track of all the funny and profane things on the Internet. The website looks like crap and is loaded with crap. Thus, it makes total sense that it&#8217;s way more popular than my other projects and already reports 50,000+ page views. I later created <a title="Where memes eat breakfast" href="http://memeaday.com">memeaday.com</a> for those people who want just one meme a day.</p>
<p>There are a couple other things in the bucket including a video mash-up website but online video editing is, well, hellza problematic. So that one&#8217;s going to take a while.</p>
<p>Lastly, my housemates and I had a blast acting out <a title="Luke et al are being crushed in a trash compactor" href="http://www.starwarsuncut.com/#/finished/330">scene 330</a> of Star Wars: New Hope. <a title="Definitely setting himself up for a sequel" href="http://www.starwarsuncut.com">Star Wars Uncut</a> is a great project and you should sign up to film a scene <strong>right now</strong>. Let me know how it goes. Our shoot was a <a title="SHUT OFF ALL THE GARBAGE MASHERS ON THE DETENTION LEVEL" href="http://www.facebook.com/v/563878041792">lot of fun</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://contolini.com/2009/10/09/things-ive-been-doing-all-weekends/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixing MySQL max_allowed_packet error in MAMP</title>
		<link>http://contolini.com/2009/08/11/fixing-mysql-max_allowed_packet-error-in-mamp/</link>
		<comments>http://contolini.com/2009/08/11/fixing-mysql-max_allowed_packet-error-in-mamp/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 22:36:58 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[web dev]]></category>
		<category><![CDATA[mamp]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://contolini.com/?p=507</guid>
		<description><![CDATA[If you get a packet bigger than &#8216;max_allowed_packet&#8217; bytes error when importing into a MySQL database on a MAMP system, you need to edit your max_allowed_packet variable. It defaults to 1MB.
There are two ways to do this:

Create a my.cnf file and set the variable.
Add --max_allowed_packet=32M to /Applications/mamp/bin/startMysql.sh. Restart MAMP.

The latter method is easier but if [...]]]></description>
			<content:encoded><![CDATA[<p>If you get a <samp>packet bigger than &#8216;max_allowed_packet&#8217; bytes</samp> error when importing into a MySQL database on a MAMP system, you need to edit your <samp>max_allowed_packet</samp> variable. It defaults to 1MB.</p>
<p>There are two ways to do this:</p>
<ul>
<li>Create a my.cnf file and set the variable.</li>
<li>Add <kbd>--max_allowed_packet=32M</kbd> to <em><small>/Applications/mamp/bin/startMysql.sh</small></em>. Restart MAMP.</li>
</ul>
<p>The latter method is easier but if you&#8217;re going to be editing other variables it&#8217;s best to create a my.cnf file. MAMP ships with <a href="#TB_inline?height=200&amp;width=550&amp;inlineId=507-1">five my.cnf configuration files</a>.</p>
<div id="507-1" class="hide">
<pre>You should be safe with my-small.cnf

/Applications/MAMP/Library/share/mysql/my-huge.cnf
/Applications/MAMP/Library/share/mysql/my-innodb-heavy-4G.cnf
/Applications/MAMP/Library/share/mysql/my-large.cnf
/Applications/MAMP/Library/share/mysql/my-medium.cnf
/Applications/MAMP/Library/share/mysql/my-small.cnf</pre>
<p>Copy it to /Applications/MAMP/Library/ and name it my.cnf.</p></div>
<p>Choose one that works for you and copy it to <kbd>/Applications/MAMP/Library/my.cnf</kbd>. Find the <samp>max_allowed_packet = <strong>1M</strong></samp> line and change it to <samp><strong>32M</strong></samp> (or whatever you prefer). Save the file and restart MAMP.</p>
<p>Phew.</p>
]]></content:encoded>
			<wfw:commentRss>http://contolini.com/2009/08/11/fixing-mysql-max_allowed_packet-error-in-mamp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to import UTF-8 encoded files into MySQL without outputting garbage</title>
		<link>http://contolini.com/2009/07/01/how-to-import-utf8-encoded-files-into-mysql-without-outputting-garbage/</link>
		<comments>http://contolini.com/2009/07/01/how-to-import-utf8-encoded-files-into-mysql-without-outputting-garbage/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 20:00:39 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[web dev]]></category>
		<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false">http://contolini.com/?p=501</guid>
		<description><![CDATA[A recent Drupal localization project proved relatively painless until we moved the data from a local machine to a staging server. Importing thousands of lines of Bulgarian into a MySQL database went smoothly BUT when Drupal pulled the data it looked like gibberish.
The database&#8217;s collation was properly set to UTF-8 but it refused to output [...]]]></description>
			<content:encoded><![CDATA[<p>A recent <a href="https://ssd.eff.org/bg" title="translating surveillance self-defense into bulgarian">Drupal localization project</a> proved relatively painless until we moved the data from a local machine to a staging server. Importing thousands of lines of Bulgarian into a MySQL database went smoothly BUT when Drupal pulled the data it looked like gibberish.</p>
<p>The database&#8217;s collation was properly set to <a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a> but it refused to output Cyrillic instead of garbage. The solution? Edit your <a href="http://dev.mysql.com/doc/refman/5.1/en/option-files.html" title="usually my.cnf">MySQL options file</a> to change the <strong>server&#8217;s</strong> character set to UTF-8. Adding <em>character-set-server = utf8</em> to my.cnf should do the trick.</p>
]]></content:encoded>
			<wfw:commentRss>http://contolini.com/2009/07/01/how-to-import-utf8-encoded-files-into-mysql-without-outputting-garbage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keyword stuffing Craigslist: still an easy task</title>
		<link>http://contolini.com/2009/06/17/keyword-stuffing-craigslist-still-an-easy-task/</link>
		<comments>http://contolini.com/2009/06/17/keyword-stuffing-craigslist-still-an-easy-task/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 07:03:05 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[web dev]]></category>
		<category><![CDATA[black hat]]></category>
		<category><![CDATA[craigslist]]></category>

		<guid isPermaLink="false">http://contolini.com/?p=487</guid>
		<description><![CDATA[Note: Craigslist has since patched this hole.
Back in the heyday of Craigslist spam, exploiters found simple methods of circumventing the site&#8217;s reliance upon community moderation. Keyword stuffing, the act of loading a page with keywords to increase its visibility in search results, was super easy because Craigslist stripped few HTML elements (and attributes) from posts.
A [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Note: Craigslist has since patched this hole.</strong></p>
<p>Back in the heyday of Craigslist spam, exploiters found simple methods of circumventing the site&#8217;s reliance upon community moderation. Keyword stuffing, the act of loading a page with keywords to increase its visibility in search results, was super easy because Craigslist stripped few HTML elements (and attributes) from posts.</p>
<p>A user could create a post to sell, for example, a Squier Stratocaster, and <a href="http://contolini.com/wp-content/uploads/2009/06/keyword-stuffing-craigslist.png" title="example Craigslist posting demonstrating keyword stuffing">pump related keywords into a hidden <code>div</code></a>. Craigslist would index the hidden words even though they were kept from visitors&#8217; eyes. Someone searching Craigslist for a les paul would find the squier posting because &#8220;les paul&#8221; was found inside the hidden <code>div</code>.</p>
<p>Keyword stuffing is both annoying and ineffective. Anyone looking to buy a Les Paul is not going to be interested in a low-end Squier. <i>But,</i> it&#8217;s a cheap and easy way to push content toward thousands of eyes. For this reason, spammers and scammers love it.</p>
<p>Eventually, enough users smelled something fishy in their <acronym title="search engine results page">SERP</acronym> and complained to Craigslist. A year ago Craigslist rolled out an update that blocked most HTML elements and attributes, permitting only a <a href="http://www.craigslist.org/about/help/html_in_craigslist_postings/details" title="craigslist help article listing allow HTML elements and attributes">select few</a>.</p>
<p>The update stopped keyword stuffing dead in its tracks. Nowadays, most Craigslist keyword stuffing occurs through use of <code>font</code> elements with a <code>color</code> attribute set to a very light color, often <code>lightyellow</code> or <code>honeydew</code>. People <a href="http://www.wahm.com/forum/forum_posts.asp?TID=527125" title="forum thread of people discussing this method of keyword stuffing">notice this text</a> and flag the ads. Community moderation defeats it.</p>
<p>But there is still a gaping hole in Craigslist&#8217;s search engine: the values of attributes are indexed. Attribute value types that aren&#8217;t checked for integrity, such as <code>uri</code>, can be keyword stuffed.</p>
<p>Instead of hiding keywords in a <code>div</code>, they can be hidden in the values of <a href="http://contolini.com/wp-content/uploads/2009/06/keyword-stuffing-craigslist-href.png" title="keyword stuffing with a faux link"><code>href</code></a> and <a href="http://contolini.com/wp-content/uploads/2009/06/keyword-stuffing-craigslist-src.png" title="keyword stuffing with a faux image"><code>src</code></a>. Craigslist checks for whitespace so slashes must be inserted, but slashes are conveniently treated as spaces when pulling search results.</p>
<p>Here&#8217;s a live example I made to demonstrate <a href="http://sfbay.craigslist.org/search/sss?query=super+cali+fragi+listic+expi+ali+docious" title="craigslist search demonstrating effective keyword stuffing">keyword stuffing an HTML attribute on Craigslist</a> <em>(Note: This link has since expired.)</em>. The queried words don&#8217;t appear anywhere in the post. Viewing the page&#8217;s source code reveals their location.</p>
<p>Craigslist needs to either check the integrity of attribute values or stop indexing them. Novice users don&#8217;t flag keyword stuffed posts because they chalk their SERP appearance up to bad search engine technology and not malicious posters. Either way, the blame is on Craigslist.</p>
]]></content:encoded>
			<wfw:commentRss>http://contolini.com/2009/06/17/keyword-stuffing-craigslist-still-an-easy-task/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>If javascript affects your UI, load it ASAP</title>
		<link>http://contolini.com/2009/05/13/if-your-javascript-affects-your-ui-load-it-asap/</link>
		<comments>http://contolini.com/2009/05/13/if-your-javascript-affects-your-ui-load-it-asap/#comments</comments>
		<pubDate>Thu, 14 May 2009 01:02:58 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[web dev]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[ux]]></category>

		<guid isPermaLink="false">http://contolini.com/?p=471</guid>
		<description><![CDATA[The javascript focus() method is often used to place a user&#8217;s cursor in the username field of a login form on page load. Twitter uses this technique. After everything is loaded, a blinking cursor appears in the username field and you can begin typing your login credentials. Viewing Twitter&#8217;s source code, you can see the [...]]]></description>
			<content:encoded><![CDATA[<p>The javascript focus() method is often used to place a user&#8217;s cursor in the username field of a login form on page load. <a title="yes, that twitter" href="http://twitter.com">Twitter</a> uses this technique. <strong>After everything is loaded</strong>, a blinking cursor appears in the username field and you can begin typing your login credentials. Viewing Twitter&#8217;s source code, you can see the <a href="#TB_inline?height=100&amp;width=400&amp;inlineId=471-1">jquery snippet</a> that shifts the focus. It&#8217;s at the very bottom of the page and is loaded after several javascript libraries (why the hell do they use three separate javascript libraries?).</p>
<div id="471-1" class="hide">

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">  jQuery<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#username'</span><span style="color: #009900;">&#41;</span>.<span style="color: #000066;">focus</span><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></pre></div></div>

</div>
<p>It is advisable to place a script <a title="yahoo best web practices" href="http://developer.yahoo.com/performance/rules.html#js_bottom">just before the closing tag &#60;/body&#62; tag</a> <em>unless</em> the script affects the user&#8217;s experience on load. The javascript focus() method affects ux. When I visit twitter from a shotty connection (like when my housemates are all bittorrenting at the same time), focus is shifted to the username field after I have already typed in my username and I&#8217;m halfway through the password field. I have to re-click the password field to finish what I started. It&#8217;s annoying. Load the script in the &#60;head&#62; or directly after the corresponding element. Or just don&#8217;t shift focus.</p>
<p>Seriously, though, why does Twitter <a href="http://jquery.com/">jQuery</a>, <a href="http://www.prototypejs.org/">Prototype</a> and <a href="http://script.aculo.us/">Scriptaculous</a>? Old code? Or maybe they&#8217;re just really indecisive and like to keep their options open.</p>
<p><strong>Edit: </strong> They have since redesigned the homepage and now only use jQuery.</p>
]]></content:encoded>
			<wfw:commentRss>http://contolini.com/2009/05/13/if-your-javascript-affects-your-ui-load-it-asap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t let keyboard shortcuts hijack user experience</title>
		<link>http://contolini.com/2009/05/02/dont-let-keyboard-shortcuts-hijack-user-experience/</link>
		<comments>http://contolini.com/2009/05/02/dont-let-keyboard-shortcuts-hijack-user-experience/#comments</comments>
		<pubDate>Sat, 02 May 2009 19:28:22 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[web dev]]></category>
		<category><![CDATA[myspace]]></category>
		<category><![CDATA[ux]]></category>

		<guid isPermaLink="false">http://contolini.com/?p=409</guid>
		<description><![CDATA[One of the most frustrating aspects of myspace (and there a llloooottt of frustrating aspects) is the use of javascript keyboard shortcuts within their image viewing platform. When viewing an image from a user&#8217;s profile, hitting the left or right arrow on your keyboard will load the previous or following image, respectively.
Here&#8217;s the problem: it [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most frustrating aspects of myspace (and there a llloooottt of frustrating aspects) is the use of javascript keyboard shortcuts within their image viewing platform. When <a title="like this obama photo, for instance" href="http://viewmorepics.myspace.com/index.cfm?fuseaction=viewImage&amp;friendID=184040237&amp;albumID=18128&amp;imageID=12284050">viewing an image</a> from a user&#8217;s profile, hitting the left or right arrow on your keyboard will load the previous or following image, respectively.</p>
<p>Here&#8217;s the problem: it prevents users&#8217; from using their arrow keys for purposes other than browsing images. This is problematic because the thumb buttons on modern mice navigate backward and forward through browser history by <a title="screenshot of the thumb settings for my logitech revolution. Notice it just emulates typing cmd + left arrow." href="http://contolini.com/wp-content/uploads/2009/05/thumb-buttons.png">emulating keystrokes</a> (alt/cmd + arrow).</p>
<p>Once a user clicks through to a myspace photo, attempts to traverse backward through browser history by clicking the &#8216;back&#8217; thumb button prove fruitless. They have to manually click the &#8216;back&#8217; arrow in their browser. This confuses the user and interrupts her experience.</p>
<p>To make matters worse, some users (myself included) <a title="navigation arrows are for whimps" href="http://contolini.com/wp-content/uploads/2009/05/no-browser-navigation-arrows.png">don&#8217;t have a &#8216;back&#8217; arrow</a> in their browser. I removed mine because I became so dependent on firefox&#8217;s keyboard shortcuts I found myself never using the &#8216;back&#8217;/'forward&#8217; buttons. It allows more space for the location bar so I can read longer urls.</p>
<p>The result is a blackhole. I navigate to a myspace photo album and can&#8217;t exit. I&#8217;m forced to open my browser history or right click > &#8216;back.&#8217; It&#8217;s annoying and adds to the aggro myspace loves to evoke.</p>
<p>All I ask for is an option to disable it. If you&#8217;re going to experiment with javascript keyboard shortcuts, please make them opt-out at the very least. Opt-in (a la <a title="gmail's keyboard shortcuts must be enabled in settings" href="http://mail.google.com/support/bin/answer.py?hl=en&#038;answer=6594">gmail</a>) is ideal, and whatever you do, do not require them. What is helpful to one person can be a pain in the ass to another.</p>
]]></content:encoded>
			<wfw:commentRss>http://contolini.com/2009/05/02/dont-let-keyboard-shortcuts-hijack-user-experience/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS tip: Use :after pseudo-element to append copyright notices to printed material</title>
		<link>http://contolini.com/2009/04/25/css-tip-use-after-pseudo-element-to-append-copyright-notices-to-printed-material/</link>
		<comments>http://contolini.com/2009/04/25/css-tip-use-after-pseudo-element-to-append-copyright-notices-to-printed-material/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 01:25:31 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[web dev]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://contolini.com/?p=431</guid>
		<description><![CDATA[Here&#8217;s some simple CSS code that&#8217;s useful if people frequently print portions of your website. When added to your print stylesheet it will append your site&#8217;s copyright notice to the end of any printed page. #content should be replaced with whatever element wraps your content.


#content:after &#123;
margin-top: 40px;
content: &#34;Printed Material Notice: Any and all original material [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s some <a title="using the :after pseudo-element and content property we can append text after an element of our choice" href="#TB_inline?height=100&amp;width=700&amp;inlineId=431-1">simple CSS code</a> that&#8217;s useful if people frequently print portions of your website. When added to your print stylesheet it will append your site&#8217;s copyright notice to the end of any printed page. #content should be replaced with whatever element wraps your content.</p>
<div id="431-1" class="hide">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#content</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">40px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;Printed Material Notice: Any and all original material on this website may be freely distributed at will under the Creative Commons Attribution-NonCommercial License, unless otherwise noted.&quot;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p>I don&#8217;t recommend you append copyright notices unless your content is frequently printed and distributed. <a title="electronic frontier foundation" href="http://www.eff.org">eff</a> churns out tons of original, quotable material and I often have visitors email me asking what permission they have to cite and distribute our work.</p>
<p>check out eff&#8217;s <a title="eff's print.css file" href="http://www.eff.org/sites/all/themes/frontier/print.css">print stylesheet </a>to see it in action. In the rest of the stylesheet we strip extraneous material (sidebars, navigation, etc.), change the formatting of blockquotes and anchors so they&#8217;re not color-dependent, and print the page&#8217;s url after the &#8216;permalink&#8217; anchor using <a title="since links can't be clicked on a piece of paper, we append the hypertext reference as text so the url can be read" href="#TB_inline?height=100&amp;width=700&amp;inlineId=431-2">this snippet</a>.</p>
<div id="431-2" class="hide">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">a<span style="color: #6666ff;">.perm</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">90</span>%</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;: http://www.eff.org&quot;</span> attr<span style="color: #00AA00;">&#40;</span>href<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p>Over in <a title="print stylesheet for everyone but ie" href="http://www.eff.org/sites/all/themes/frontier/print-notie.css">print-notie.css</a> we <a title="most browsers don't print background images. the workaround is to push the image into a list's bullet point." href="#TB_inline?height=200&amp;width=700&amp;inlineId=431-3">replace our header image</a> with a printer-friendly version using a <a href="http://www.web-graphics.com/mtarchive/001703.php">list-style hack</a>.</p>
<div id="431-3" class="hide">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#logo</span> img <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span> !important
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#logo</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">list-item</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">70px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">list-style-image</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;">images/print_logo.jpg</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">list-style-position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inside</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">99</span>%</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p>This keeps everything kosher for the most part. Here&#8217;s a screenshot of a blog post in a <a title="random eff blog post displayed in firefox" href="http://contolini.com/wp-content/uploads/2009/05/blog-post-before-print-stylesheet.png">browser</a>, the same post after <a title="here's the same post after printing. extraneous content has been stripped." href="http://contolini.com/wp-content/uploads/2009/05/blog-post-with-print-stylesheet.png">printing</a>, and the post after printing <a title="without a print stylesheet it's horribly rendered and strewn across five pages." href="http://contolini.com/wp-content/uploads/2009/05/blog-post-without-print-stylesheet.png">without a print stylesheet</a>. Without a print stylesheet it spans five pages and the only usable content is on page four.</p>
<p>While EFF&#8217;s print stylesheet is not perfect, it does a good job prepping web content for printing. The :after pseudo-element, while not fully supported in all browsers, fails gracefully and can add helpful features to alternative media.</p>
<p>It&#8217;s feels odd referring to paper as an <em>alternative</em> medium&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://contolini.com/2009/04/25/css-tip-use-after-pseudo-element-to-append-copyright-notices-to-printed-material/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->