{"id":5846,"date":"2009-01-28T09:30:08","date_gmt":"2009-01-28T17:30:08","guid":{"rendered":"http:\/\/michaelhans.com\/eclecticism\/?p=5846"},"modified":"2019-12-23T13:42:03","modified_gmt":"2019-12-23T21:42:03","slug":"print-stylesheets-return","status":"publish","type":"post","link":"https:\/\/michaelhans.com\/eclecticism\/2009\/01\/28\/print-stylesheets-return\/","title":{"rendered":"Print Stylesheets Return"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:3005,&quot;href&quot;:&quot;http:\\\/\\\/daringfireball.net\\\/projects\\\/markdown&quot;,&quot;archived_href&quot;:&quot;https:\\\/\\\/web-wp.archive.org\\\/web\\\/20260306101302\\\/https:\\\/\\\/daringfireball.net\\\/projects\\\/markdown\\\/&quot;,&quot;redirect_href&quot;:&quot;https:\\\/\\\/daringfireball.net\\\/projects\\\/markdown&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-03-10 10:41:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-16 19:20:11&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-03-16 19:20:11&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p>One of my website pet peeves is the lack of attention to how a site behaves when printed. All too often, there&#8217;s either an assumption that we live in a truly online-only world, or simply a lack of thought about how any given page will look when printed. Consequently, there are a <em>lot<\/em> of websites that look like crud when printed: navigation links and ads all over the page taking up unnecessary space, content crammed into a narrow column, an extra half page of junk after the actual content ends, etc.<\/p>\n<p>Some sites give a &#8216;print view&#8217; link that produces a print-optimized version of the page, but I&#8217;d be willing to bet that a lot of people never see that &#8212; especially given the number of times I&#8217;ve had to actively hunt for such a link, and found it shoved off in some corner, not obviously tied to the content at all. Besides, having a specialized page seems like unnecessary overhead on the server when better solutions exist.<\/p>\n<p>To that end &#8212; and this is a project that I&#8217;ve been meaning to do for a while (I never even got around to it with my last design) &#8212; I&#8217;ve resurrected the print stylesheet for my site. Admittedly, I have no idea how often people print something they find here (and I would guess that it&#8217;s not very often at all), but at least now I know that if they do, they&#8217;ll get something useful.<\/p>\n<p>There&#8217;s an older, but still relevant, more detailed look at the techniques I use <a href=\"https:\/\/michaelhans.com\/eclecticism\/2003\/09\/11\/print-friendly-pages-with-css\/\" title=\"eclecticism: Print-friendly pages with CSS\">in this post from 2003<\/a>, but here&#8217;s a rundown of the results:<\/p>\n<ol>\n<li>No navigation links below the website title.<\/li>\n<li>No sidebar at all.<\/li>\n<li>No comment entry form.<\/li>\n<li>No Google ads.<\/li>\n<li>The content fills the page, with a wider left-hand margin to allow room for binding.<\/li>\n<li>Rather than coloring links (useless on a printed page), the URLs display after the linked text, using <a href=\"http:\/\/daringfireball.net\/projects\/markdown\" title=\"Daring Fireball: Markdown\">Markdown<\/a> style formatting.<\/li>\n<\/ol>\n<p>The only issue I&#8217;m having is the <a href=\"https:\/\/michaelhans.com\/eclecticism\/2005\/09\/28\/help-css2-selectors\/\" title=\"eclecticism: Help: CSS2 selectors\">same issue I had<\/a> the first time I set up a print stylesheet: the code that inserts URLs after linked items borks up the clean display of inline images (for an example, try printing <a href=\"https:\/\/michaelhans.com\/eclecticism\/2009\/01\/12\/old-fishing-hole-triptych\/\" title=\"eclecticism: Old Fishing Hole Triptych\">this post<\/a>). I&#8217;m (still) stumped on how to exclude images from the link insertion code, though, so for now, I&#8217;m just going with what I&#8217;ve got.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve resurrected the print stylesheet for my site. Admittedly, I have no idea how often people print something they find here (and I would guess that it&#8217;s not very often at all), but at least now I know that if they do, they&#8217;ll get something useful.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2040],"tags":[25],"class_list":["post-5846","post","type-post","status-publish","format-standard","hentry","category-blog","tag-website"],"_links":{"self":[{"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/posts\/5846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/comments?post=5846"}],"version-history":[{"count":0,"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/posts\/5846\/revisions"}],"wp:attachment":[{"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/media?parent=5846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/categories?post=5846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/tags?post=5846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}