Email Email address Location Postal address Tag Item category Url Web address Phone Phone number Previous Go to the previous item Next Go to the next item Quote This is quote Dribbble Link to Dribbble profile Github Link to Github profile Instagram Link to Instagram profile LinkedIn Link to LinkedIn profile Twitter Link to Twitter profile

Blog

Save a tree with a print stylesheet

Sometimes you just need to print a web page. Perhaps a recipe for something you want to cook, or a list of items you want to order.

Nothing is more infuriating then printing a page and ending up with a stack of paper containing every single element of the web page: banners, adverts, navigation blocks, social media widgets, etc. Easy solution is to add a print stylesheet to your website, which omits all those things. Making everyone happy and saving some trees in the process.

If you use media queries to target different screen sizes then a printer will ignore what’s in these media queries, except if you include "print" in the media query. And it seems to like being first in the list.

Like this:

@media print, screen { ... }

Previous pageAbove the fold

Next pageThe first thing I used the internet for