<?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>Aliso the Geek &#187; CSS</title>
	<atom:link href="http://alisothegeek.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://alisothegeek.com</link>
	<description>Eliminating excuses for crappy code.</description>
	<lastBuildDate>Sun, 18 Jul 2010 18:51:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to make a great print stylesheet</title>
		<link>http://alisothegeek.com/2010/01/23/how-to-make-a-great-print-stylesheet/</link>
		<comments>http://alisothegeek.com/2010/01/23/how-to-make-a-great-print-stylesheet/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 22:58:00 +0000</pubDate>
		<dc:creator>Alison</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[blog design]]></category>
		<category><![CDATA[print]]></category>
		<category><![CDATA[stylesheet]]></category>

		<guid isPermaLink="false">http://alisothegeek.com/?p=521</guid>
		<description><![CDATA[For any website with a sidebar or a background image, print stylesheets are essential. Using “File » Print” is so much more intuitive for users than searching for a “Print this page” button on a website, and creating print-friendly versions of all your pages is a tedious, time-consuming task (especially if you have a blog). A print stylesheet is an elegant alternative.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Falisothegeek.com%2F2010%2F01%2F23%2Fhow-to-make-a-great-print-stylesheet%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Falisothegeek.com%2F2010%2F01%2F23%2Fhow-to-make-a-great-print-stylesheet%2F&amp;source=alisothegeek&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://alisothegeek.com/files/2010/01/Screen-shot-2010-01-22-at-10.52.43-PM.png" rel="wp-prettyPhoto[g521]"><img class="alignleft size-medium wp-image-522" title="Printed page 1 of my blog" src="http://alisothegeek.com/files/2010/01/Screen-shot-2010-01-22-at-10.52.43-PM-231x300.png" alt="" width="185" height="240" /></a>I just finished making a new print stylesheet for AlisotheGeek.com. For any website with a sidebar or a background image, print stylesheets are essential. Using &#8220;File » Print&#8221; is so much more intuitive for users than searching for a &#8220;Print this page&#8221; button on a website, and creating print-friendly versions of all your pages is a tedious, time-consuming task (especially if you have a blog). A print stylesheet is an elegant alternative.</p>
<h3>Set up a print stylesheet</h3>
<p>For those who don&#8217;t know how to make a print-specific stylesheet, it just takes the addition of one attribute to your CSS links in the <code>&lt;head&gt;</code> section of your site:</p>
<pre><code>&lt;link rel="stylesheet" href="style.css" type="text/css" media="screen, projection" /&gt;
&lt;link rel="stylesheet" href="print.css" type="text/css" media="print" /&gt;</code></pre>
<p>The &#8220;media&#8221; attribute tells the browser to pay attention to stylesheets only in those situations. Add &#8216;media=&#8221;print&#8221;&#8216; to your stylesheet link for a print stylesheet. If the &#8220;media&#8221; attribute is left out, that stylesheet is called in all display situations, including print.</p>
<h3>Hide unnecessary information with <code>display: none</code></h3>
<p>In the case of my website, I decided to hide things like the sidebar, the email subscription form, and the social media/bookmarking links at the end of each post. Do this with a simple <code>display: none;</code> at the top of your stylesheet. The user isn&#8217;t trying to print out your sidebar; they&#8217;re trying to print the article they just read.</p>
<h3>Add back any global styles to make your printed page match your website</h3>
<p>This step is only necessary if you left your main stylesheet out of the mix for printed pages. You will probably want your fonts to be the same on paper as they are on a screen, so make sure to re-insert those styles in your print stylesheet. The same goes for classes that apply global formatting to elements, such as floating images left or right.</p>
<h3>Add extra information to your website to display only in printed pages</h3>
<p>On my website, you&#8217;ll notice that the only thing in the footer is the copyright statement. When it&#8217;s printed, the URL &#8220;alisothegeek.com&#8221; appears in the right side of the footer. This is something I added in my footer (you can see it in the source code) and I set it to hide in my main stylesheet, but not my print stylesheet. Things like this can give a little extra clarity to users who print an article and later forget where it came from.</p>
<p>Also, the header on my site is one giant background image, with no text. Many modern browsers automatically turn off background images when they print pages, in order to save ink or toner. For the benefit of a user printing my site (and for the benefit of screen readers &amp; search engines) I do have text in the header of my site, and CSS is hiding it on the screen. This way, it shows up on printed pages but not in the browser. I also added my logo next to that text using an &lt;img&gt; tag so it would still print.</p>
<h3>Make hyperlinks useful on a printed page</h3>
<p><a href="http://alisothegeek.com/files/2010/01/Screen-shot-2010-01-22-at-10.53.32-PM.png" rel="wp-prettyPhoto[g521]"><img class="aligncenter size-large wp-image-538" title="Hyperlink URLs in a print stylesheet" src="http://alisothegeek.com/files/2010/01/Screen-shot-2010-01-22-at-10.53.32-PM-1024x116.png" alt="" width="540" height="61" /></a></p>
<p>Printing out a hyperlink is just like printing out text that&#8217;s underlined. It means no more to the reader than regular formatted text. To keep hyperlinks useful on a printed page, I added this code to my CSS (taken and modified from <a href="http://www.alistapart.com/articles/goingtoprint/">this article at A List Apart</a>):</p>
<pre><code>.entry a:after {
     content: " [" attr(href) "]";
     font-size: 80%;
     font-weight: normal;
}</code></pre>
<p>This adds the URL after each hyperlink in my post&#8217;s content (which is <code>div class="entry"</code>) in slightly smaller font surrounded by square brackets. This way, a printed article still retains the benefits of its hyperlinks.</p>
<h3>Make final touches to keep it looking classy</h3>
<p>Take some time and print out some test pages. Make formatting tweaks as necessary to make sure you didn&#8217;t miss anything from your main stylesheet that you want to keep in printed form. Add padding or margin where it will help things look nicer. For many websites, a printed page is a lot wider than the main content area is on the screen, so take that into consideration as well.</p>
<p>I hope this post helps some website builders out there with print stylesheet creation. It&#8217;s something that is often overlooked in website design, but something users really appreciate when it&#8217;s done right. Happy coding!</p>


<h3>Related Posts</h3><ul><li><a href='http://alisothegeek.com/2009/10/23/fugue-sprite-css/' rel='bookmark' title='Permanent Link: Fugue Sprite CSS'>Fugue Sprite CSS</a></li>
<li><a href='http://alisothegeek.com/2010/02/11/10-great-wordpress-developer-resources/' rel='bookmark' title='Permanent Link: 10 great resources for WordPress developers'>10 great resources for WordPress developers</a></li>
<li><a href='http://alisothegeek.com/2010/03/09/why-search-engines-scare-the-crap-out-of-me/' rel='bookmark' title='Permanent Link: Why search engines scare the crap out of me'>Why search engines scare the crap out of me</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://alisothegeek.com/2010/01/23/how-to-make-a-great-print-stylesheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fugue Sprite background-positioning fixed</title>
		<link>http://alisothegeek.com/2009/10/30/fugue-sprite-background-positioning-fixed/</link>
		<comments>http://alisothegeek.com/2009/10/30/fugue-sprite-background-positioning-fixed/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 19:53:08 +0000</pubDate>
		<dc:creator>Alison</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[fugue]]></category>
		<category><![CDATA[icons]]></category>
		<category><![CDATA[sprite]]></category>
		<category><![CDATA[toys]]></category>

		<guid isPermaLink="false">http://alisothegeek.com/?p=472</guid>
		<description><![CDATA[A friend alerted me to the fact that some browsers weren’t showing the Fugue Sprite properly: everything was showing up as the topmost icon in the image (for example, the first 100 sprites all had the Address Book icon). I did fix it, and I uploaded the new CSS to both my demo page and the ZIP file. Enjoy!]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Falisothegeek.com%2F2009%2F10%2F30%2Ffugue-sprite-background-positioning-fixed%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Falisothegeek.com%2F2009%2F10%2F30%2Ffugue-sprite-background-positioning-fixed%2F&amp;source=alisothegeek&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<p>A friend alerted me to the fact that some browsers weren&#8217;t showing the Fugue Sprite properly: everything was showing up as the topmost icon in the image (for example, the first 100 sprites all had the Address Book icon).</p>
<p>I did fix it, and I uploaded the new CSS to both my <a title="View the complete list of classes and icons" href="http://alisothegeek.com/wp-content/themes/aliso-thesis/fugue-sprite/">demo page</a> and the ZIP file. Enjoy!</p>
<p><a class="download-link" href="http://alisothegeek.com/files/2009/10/fugue-sprite2.zip">Fugue Sprite CSS (684 KB)</a></p>


<h3>Related Posts</h3><ul><li><a href='http://alisothegeek.com/2009/10/23/fugue-sprite-css/' rel='bookmark' title='Permanent Link: Fugue Sprite CSS'>Fugue Sprite CSS</a></li>
<li><a href='http://alisothegeek.com/2010/04/27/transmit-4-brand-new-look/' rel='bookmark' title='Permanent Link: Transmit 4 has a brand new look (and icon)'>Transmit 4 has a brand new look (and icon)</a></li>
<li><a href='http://alisothegeek.com/2009/06/02/wordpress-plugins-updated/' rel='bookmark' title='Permanent Link: WordPress Plugins Updated'>WordPress Plugins Updated</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://alisothegeek.com/2009/10/30/fugue-sprite-background-positioning-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fugue Sprite CSS</title>
		<link>http://alisothegeek.com/2009/10/23/fugue-sprite-css/</link>
		<comments>http://alisothegeek.com/2009/10/23/fugue-sprite-css/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 01:09:21 +0000</pubDate>
		<dc:creator>Alison</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[fugue]]></category>
		<category><![CDATA[icons]]></category>
		<category><![CDATA[toys]]></category>

		<guid isPermaLink="false">http://alisothegeek.com/?p=462</guid>
		<description><![CDATA[I came across the Fugue icon set a few months ago, and I’m using is often enough that I decided to make something similar to the SilkSprite. I created the Fugue Sprite: a CSS file &#38; set of images that provides easy access to all 2,330 Fugue icons.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Falisothegeek.com%2F2009%2F10%2F23%2Ffugue-sprite-css%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Falisothegeek.com%2F2009%2F10%2F23%2Ffugue-sprite-css%2F&amp;source=alisothegeek&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<p>Any <a title="Blueprint" href="http://www.blueprintcss.org/">Blueprint</a> users out there have probably heard of <a title="SilkSprite" href="http://www.ajaxbestiary.com/Labs/SilkSprite/">SilkSprite</a>, a plugin for Blueprint that provides easy access to the entire <a title="Silk Icon Set from famfamfam" href="http://www.famfamfam.com/lab/icons/silk/">Silk Icon Set from famfamfam</a>. It&#8217;s basically a <abbr title="Cascading Style Sheet">CSS</abbr> file and a single image that you can use in any website, whether or not you use Blueprint.</p>
<p>I came across the <a class="fugue fugue-document-zip" title="Fugue icon set" href="http://www.pinvoke.com/">Fugue icon set</a> a few months ago, and I&#8217;m using is often enough that I decided to make something similar to the SilkSprite. I created the Fugue Sprite: a <abbr title="Cascading Style Sheet">CSS</abbr> file &amp; set of images that provides easy access to all 2,330 Fugue icons.</p>
<p>To use it, just unzip the file and upload that folder to your server. Then link to the stylesheet. Voilà! Now you can use the Fugue class names on any element in your website to give it a left-aligned background of that Fugue icon, with 20 pixels of padding on the left.</p>
<p>Make sure the images stay in the same folder as the stylesheet.</p>
<p>The Fugue icon set is released under the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 license</a>, so if you use it, be sure to provide a link back to <a title="Pinvoke" href="http://www.pinvoke.com/">Pinvoke</a> giving them credit for the icons. Enjoy!</p>
<h3><a class="download-link" href="http://alisothegeek.com/files/2009/10/fugue-sprite.zip">Fugue Sprite CSS (684 KB)</a></h3>
<p><a href="http://alisothegeek.com/wp-content/themes/alisothegeek.com/fugue-sprite/">View the complete set of icons &amp; classes.</a></p>


<h3>Related Posts</h3><ul><li><a href='http://alisothegeek.com/2009/10/30/fugue-sprite-background-positioning-fixed/' rel='bookmark' title='Permanent Link: Fugue Sprite background-positioning fixed'>Fugue Sprite background-positioning fixed</a></li>
<li><a href='http://alisothegeek.com/2010/01/23/how-to-make-a-great-print-stylesheet/' rel='bookmark' title='Permanent Link: How to make a great print stylesheet'>How to make a great print stylesheet</a></li>
<li><a href='http://alisothegeek.com/2010/04/27/transmit-4-brand-new-look/' rel='bookmark' title='Permanent Link: Transmit 4 has a brand new look (and icon)'>Transmit 4 has a brand new look (and icon)</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://alisothegeek.com/2009/10/23/fugue-sprite-css/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
