Download Print.css in a .zip file

Not knowing CSS very well and being new to WordPress, I looked all over for a Printer Friendly plugin that would print just the body of the pages in a post or a page on my website. I found a plugin, but I could not get it to work. (I am not experienced enough to know how to edit CSS and PHP very well) . I also found a couple of pre-made CSS files that were to make the posts and pages printer-friendly, but I did not have the right theme or know what they were trying to include, and so it would not print right for me.

In the end, I was able to find a basic CSS tutorial on how to make a printer-friendly CSS file. But, the tutorial was not really made for WordPress. So, back to the drawing board. In the end, I created a printer-friendly CSS file. I had to add a bit of code to the header.php page of the theme to get it to work correctly. This file will not give you an on screen printer preview of what it will print. But, if you goto File / Print Preview in the browser, it will show you what the page will look like before you print it.

This one file may not work for all, but I have included a short how-to to modify it. Basically, if it is showing things you do not want to print, then look in your theme / style.css (For WordPress)  file to see what the name of the ID is. For example, if it is showing the menu blocks on the right and left side of the page, and you do not want to print those, then look in the style.css file and find what they are called. For example, you might find this in your style.css:

#block {
padding: 0 0 0 0;
font-size: 80%;
text-align: justify;
}

So, in the print.css , replace

#right_block {
display: none;
}

with

#block {
display: none;
}

and it will make it so what is defined in the style.css as #block will not display when you print it. You can use this to narrow down the elements on the page you want to be printed.

Also, for WordPress, you need to add the following to your header.php file that is found in your theme folder.

<link rel=”stylesheet” type=”text/css” media=”print” href=”<?php echo get_settings(’siteurl’); ?>/print.css” />

If you are not using WordPress, you still need to put this in the head of the page(s) you want to be printer friendly.

To view it before it prints, open your browser, see if it has File | Printer Preview and click on it, view it and then you can print it.

Unfortunately, my knowledge on CSS and PHP is extremely limited so I will not be able to support this. The best thing I can say is play around with it and try new things. You can always delete the print.css if you get it all out of whack. It might take a few tries to get it just right for what you want to print.

Download Print.css in a .zip file

End of Article





85 Responses to “CSS Printer Friendly for WordPress”

  1. eveums (1 comments) Says:

    Thank you for writing this post and for the help on the WP forums! I’m looking forward to working with print.css.
    Best wishes!

  2. Aleeya (23 comments) Says:

    You are welcome. I hope it helps!

  3. Farhan (1 comments) Says:

    Very useful, thanks.

  4. My Little Yorkshire Terrier (1 comments) Says:

    Alles, das Sie wnschen, ist vor Ihnen recht. Die Frage ist “was Sie tun mit ihm”?

  5. affiliate internet marketing (1 comments) Says:

    Great blog. Found your blog while searching for more information at yahoo about this post . Your blog has quite a lot of interesting thoughts. Keep up the good work!

  6. Bobs Spas (1 comments) Says:

    You have really done a good job on this. Keep it up!

  7. lening (1 comments) Says:

    Hi, I like your site! I enjoyed browsing it. Thanks. In Dutch we say dank-je-wel 4 thanks)) :-)

  8. hypotheek (1 comments) Says:

    I like what you did with the design of your blog! Compliments. Regards, Albert.

  9. ibm disaster recovery (1 comments) Says:

    Stopping by! I am trying to start my own blog on disaster recovery site suggest.I heard some people just have blogs now and don’t use regular urls? Do you agree with this way to promote url?. Just starting out, DREW

  10. fax server topcall (1 comments) Says:

    I loved your post! I came across your blog and it really cuaght my attention, I’ll be sure to come back for more! Keep up the good work!

  11. Susan (1 comments) Says:

    Hi, My name is Suzanne from France. 16 years of age. I like this too! I am a student, doing research on the recent ‘bloghype’ I hope you do not mind me using it coming thursday when I have to finish my project. It would be nice to show my teachers I learned something here. Thanks. :-)

  12. limoserv963 (1 comments) Says:

    Hi, I thought I’d just leave this message on your blog. I hope you don’t mind. I’ve been trying to find blogs where people are talking about Search engine marketing tutorials and when I was looking, I found this one on this post. You have helped me in some way. Anyway, I want to say thank you before I go off to find some more info about it.

  13. Lawyer (1 comments) Says:

    I couldn’t agree more!

  14. GFFANull (1 comments) Says:

    I really could care less but I did agree with what you said.

  15. Ramon (1 comments) Says:

    Thanks for the information. Very helpful.

  16. Quincy (1 comments) Says:

    Awesome! Thanks.

  17. Grant (1 comments) Says:

    Awesome! Thanks.

  18. Corey (1 comments) Says:

    Wow this is a nice site. :0) I like the comments even though I don’t 100% agree with all of them. I am a grad student at the University of Sacred Heart in Connecticut. If you don’t mind I will use your blog as a example for my semester project that I am doing on the internet and ecommerce. If you reject the thought send me a quick email

    -Corey

  19. LEONARDO (1 comments) Says:

    What is up! I am trying to start my own blog on restore data excel.Can you add your blog as a subdirectory of your domain if you already paid for domain?. Thank you so much, LEONARDO

  20. Hotels Leeds (1 comments) Says:

    I use something called Programmers Notepad which is completely free to edit my css files.

  21. Artem (1 comments) Says:

    Thank you for writing this post!

  22. Yamaha Parts (2 comments) Says:

    Great post girl!

  23. is there a good Print Plugin? - Blog Forum - Bloggeries Says:

    [...] I found the following, perhaps useful links. WP-Print 2.31 Readme WP-Print 2.31 Readme CSS Printer Friendly for WordPress » Aleeya dotNet __________________ Inkweaver Review Imagination Manifesto Please follow me on [...]

  24. sbs başvuruları (1 comments) Says:

    Awesome tips thanks for this article.

    sbs baÅŸvuruları’s last blog post..2009 sbs ne zaman

  25. Matt (6 comments) Says:

    Hey! Thanks for posting this info. One of the things Im starting to do now a days is get more into hacking the templates I am using, and I like the fact that we can. One thing I recently did was create a site that I can experiment with before I use on others, and I can tell you it makes all the difference!

    Matt

    Matt’s last blog post..Golf Packages In Arizona is Where I Vacation

  26. Aleeya (23 comments) Says:

    Matt I have to agree with you- that is what I spend a lot of time doing. I love the templates available but even better I love to be able to alter them and make them more personal. Its where I learn a lot of the code by breaking them down. Thanks for your input! And great idea using another site to beta test on before you use it on the final one!

  27. Digital Photo Frame (1 comments) Says:

    I just started using Wordpress after years at blogger. It really is good to work with and easy to set up. Thank you so much for these tips.

  28. arisdkmo (1 comments) Says:

    I like the comments even though I don’t 100% agree with all of them. I am a grad student at the University of Sacred Heart in Connecticut. If you don’t mind I will use your blog as a example for my semester project that I am doing on the internet and ecommerce. If you reject the thought send me a quick email

  29. London Tours (1 comments) Says:

    Nice post, it has certainly helped me. I start with templates and amend them to suit my own needs – your css help will help me to improve them further. Thanks.

  30. The Big Man (1 comments) Says:

    Interesting use of CSS code. It’s not how I would have done, but it certainly does the job. Nice blog, bye the way, I visit you regularly, so I thought I’d drop a quick comment to say hello.

  31. Lisa (1 comments) Says:

    Very interesting use of CSS indeed. I’ve been teaching myself this information regularly now by hacking my own templates to my specifications. Some of the time I have trouble, but it can usually be fixed one way or another.

  32. Boston Injury Lawyer (1 comments) Says:

    You have to be careful with CSS in your web programming because different browsers read in differently.

    As a rule of thumb, you should try to preview any css site you’re building in all browsers to ensure quality appearance.

  33. Milwaukee Web Designer (1 comments) Says:

    Have you tried using this with the latest browser flavors? Looks great in Firefox 3 and Safari, but preview and print both produced blank pages in IE 6 and IE 7 for me.

    Milwaukee Web Designer’s last blog post..Blog Auto-Subscribe and Auto-Discovery Setup

  34. All info about Scarlett Johansson! (1 comments) Says:

    Thanks for the article. It was extremely useful for me as I learn by myself. And I agree with Boston Injury Lawyer. Different browsers display CSS in different way and might need tweaking for each browser. Once again thanks for the extremely useful information. Cheers.

    All info about Scarlett Johansson!’s last blog post..Scarlett Johansson Has No ‘Baby’ Plans – RightFielders Women in Sports

  35. AS (1 comments) Says:

    Very useful

  36. Free Albums (1 comments) Says:

    Great article. I’m still learning CSS and the information in this post were really useful. The comments were also really helpful. Thanks guy. Cheers

  37. Work At Home (1 comments) Says:

    this is some really awesome info on css. Thanks for sharing.

  38. webb tech (1 comments) Says:

    This is indeed a helpful post.

  39. Sample Resumes (1 comments) Says:

    Thanks for the css tips.. I am going to implement it now.

    Sample Resumes’s last blog post..Sample Bank Branch Manager Resume

  40. Web Design (8 comments) Says:

    This was the main problem I was having and couldn’t find any proper plug in.. Thanks this CSS file is working OK for me .. Thanks, I been looking through your blog, it has couple of useful tutorials to make blogging worth it.

  41. Hotels in London (1 comments) Says:

    Nice post. I dont think you can under estimate the power of CSS as they can help in SEO, speed and userbility.

  42. Discount Hotels (1 comments) Says:

    I am still quite new at css but your post has been really helpful in answering some of my questions. Thanks.

  43. suchmaschinen platzierung (1 comments) Says:

    Great. Just what I was looking for. I too was looking for this for quite some time but couldn’t find anything useful. This works great though. Thanks for the awesome plug-in. and keep up the awesome work. Cheers

  44. Magento (1 comments) Says:

    Thanks for the blogpost. I´m trying to do my first steps in working with wordpress. This helps a lot. Thanks!

  45. ask web directory (1 comments) Says:

    stumbled upon your blog and found it really useful. Especially this post. I’m learning CSS and this article gave me some really useful tips. I’m no coder or designer but this really helped me a lot. thank you

  46. Student Learning Disabilities (1 comments) Says:

    Wow,cool. One of my friend who came to your site recommended me to have a look. and its simply awesome. I’ve being using CSS for quite some time now in this is one awesome tip I’ve come across. Keep it up. Will be back again for some good tips.

  47. Cufflink Box (1 comments) Says:

    I visited your site few days back and started using the plug-in. I’ve to hand it to you it works simply awesome. Just thought to drop a word. Thanks alot

  48. Mobile Technology (1 comments) Says:

    Thanks for the post it was very informative. I never thought about making my blogs print friendly. I could see some issues while trying to install this plug. Also what happens to the background images when printing. I don’t think they show up when being used within css.

    Mobile Technology’s last blog post..Consumer Electronics Show (CES) – The Hub of Techno Products

  49. Press Release Services (1 comments) Says:

    Neat, this plug-in really pointed me out that if the blog is print friendly as well, it will be really easy for the readers. Also the plug-in is coded in a really awesome way. Need to try this out. Thanks

  50. Jeff Stokvis (1 comments) Says:

    well, that is indeed a very nice idea and I read from the comments its working, but … I can’t download it I tried 2 times, it shows the 404 page …

  51. Web design london (1 comments) Says:

    Very interesting use of CSS indeed
    Thanxs found the interesting use of CSS very beneficial will pass on to some people i know into Web Design in London. The Search Engine Marketing tutorials are hard to find

  52. Tina @ Low Book Sales (1 comments) Says:

    Great. Nice plug-in. CSS is such a powerful tool. Great work with the plug-in. Love it. Also the file is downloading okay Jeff. Give it another go. Cheers

  53. Yagnaroopaya (3 comments) Says:

    Thatÿffff92s Too nice, when it comes in india hope it can make a Rocking place for youngster.. hope that come true.

  54. Yagnaroopaya (3 comments) Says:

    It sounds like you’re creating problems yourself by trying to solve this issue instead of looking at why their is a problem in the first place.

  55. Govindaya (1 comments) Says:

    amazing stuff thanx :)

  56. Married Chatrooms (1 comments) Says:

    Superb. Great for my CSS learning. nice work with the plug-in. I really need to check it out tonight. Thanks

  57. Devon Cottages (1 comments) Says:

    Nice, I have taken this approach with my WP site and it works sweetly. Thanks.

  58. Fatakat Forums (2 comments) Says:

    Thank you very much! I didn’t know I could do that!

  59. Central PA Boudoir Photographer (2 comments) Says:

    Thank you so much for this… I made a lot of my website black to save energy, but didn’t know how to save the ink, too! I will try this on my next update. Wish me luck! :)

    Central PA Boudoir Photographer’s last blog post..I Love Kitsch!

  60. Fatakat Forums (2 comments) Says:

    This is very helpful, thank you.

  61. Yagnaroopaya (3 comments) Says:

    thanks !! very helpful post!

  62. Fluke TiR1 Infrared Camera (1 comments) Says:

    Thanks a lot for the awesome plug-in. CSS is a really useful tool and this would really help to learn CSS. Thanks again. Cheers

  63. photographers leeds (1 comments) Says:

    Thanks for these tips, very helpful.

  64. las vegas divorce lawyer (1 comments) Says:

    You have really done a good job on this. Keep it up!

  65. Nadeesha @ ROCKFUSE Blog Resources (2 comments) Says:

    Interesting. Really good article. CSS is one awesome and powerful tool. Making it printer friendly would help people learn from the code. which is a good thing. But I doubt everyone will like to implement this. Nevertheless, great job. Keep it up. Cheers

    Nadeesha @ ROCKFUSE Blog Resources’s last blog post..I moved to HostClear! Probably the best blog host I’ve been with.

  66. LGA Limo (2 comments) Says:

    Yup, appreciate the information here. Found it really useful for some of my work. I’ve been wondering around your blog for sometime now and just thought to drop by and thank you. Cheers. Keep it up man

  67. improve my credit score (1 comments) Says:

    Interesting article. Printer friendly CSS would be only for educational purpose isn’t it. would there be any other use of it? Thanks anyway.

  68. best savings account (1 comments) Says:

    Thanks for the tips. CSS is one awesome tool. And by this plug-in most of the visitors can learn CSS by printing the code out. Really awesome. Thanks a lot.

  69. Arizona SEO (1 comments) Says:

    This was a great tip. At Arizona SEO we are continually trying to improve our site, blog and functionality. We just switched our blog over to WP, so this will definitely come in handy!!

    Thanks for the detail!!!

  70. NASCAR (1 comments) Says:

    One of my buddies pointed me to your site. It’s really cool. Thanks for this awesome plug-in. Many newbies will be helped with this lug-in. thanks a bunch.

  71. web designer essex (1 comments) Says:

    Using a Print stylesheet is definately worth doing, Print is just one of 10 different media types defined in the CSS2 spec including “screen”, “projection” “tv” and “handheld”.

    e.g. for wordpress use:

    <link rel=”stylesheet” media=”screen,projection,tv” href=”/main.css” type=”text/css”>

    <link rel=”stylesheet” media=”handheld” href=”/smallscreen.css” type=”text/css”>

  72. cheap gas prices (1 comments) Says:

    Thanks for your great post. I never even thought of how to make my blogs printer friendly. I’m not familiar with CSS too much but your pointing me in the right direction.

  73. Make your blog printer friendly! » Obvious Ideas Says:

    [...] Aleeya.Net: CSS Printer Friendly for Wordpress – a sample CSS (didn’t work on Cutline theme) an some tips on how to make your own CSS. [...]

  74. Things to do in London (1 comments) Says:

    Thanks for this post. I’ve only just started using Word press myself and I was a bit confused at first, this article and the other posts below have helped clear it up for me.

  75. ACT Test Prep (2 comments) Says:

    thanks for the print css tips. seems like this is a “timeless” post. am also going to try and get this working on our joomla sites.

    ACT Test Prep’s last blog post..GRE Test

  76. ADILA (1 comments) Says:

    Hi,

    I am looking for ink cartridges for the Epson RX700. I have bought compatibles in the past but the ink quality is not so great or the chips dont recognise. Any help would be appreciated :)

  77. one way links (1 comments) Says:

    CSS is one really awesome and powerful language. I’ve always believed learning learning by example is the best way to understand anything. Learning CSS from a site code is the best. This plug-in really will help to do this. Appreciate it. Cheers

  78. Digital Photo (1 comments) Says:

    I really liked the way they came off

  79. Fountain Pen Club (1 comments) Says:

    Thats a simple method you’ve adapted there.Very impressive, makes things a lot more easier now. Much more user friendly actually, a couple of my friends really want to start up their own blogs, I’d recommend this method to them. Thanks for sharing.

  80. Photo Restoration (1 comments) Says:

    CSS is I believe the best ever language for designing. The simple yet powerfulness of the language really does help create some stunning sites and designs. By this plug-in i think a lot of people can learn by example. Cheers

  81. CSS Printer Friendly for WordPress Aleeya dotNet | Wood TV Stand Says:

    [...] CSS Printer Friendly for WordPress Aleeya dotNet Posted by root 1 hour 47 minutes ago (http://www.aleeya.net) E g for wordpress use lt link rel stylesheet media screen projection tv href main css type text css gt lt link rel stylesheet media handheld Discuss  |  Bury |  News | CSS Printer Friendly for WordPress Aleeya dotNet [...]

  82. T0611 (1 comments) Says:

    hey thanks m8t i really think its good what you created, but i find to mix css and tables is best in my opinion less hacks and stuff anyway im gona book mark this page thanks

  83. Murrietta (1 comments) Says:

    That was a great post…I love this site…Thanks

  84. John Ree (1 comments) Says:

    Really a educative and informative post, the post is good in all regards,I am glad to read this post.

  85. Thum (1 comments) Says:

    I Love the way you write…thanks for posting

Leave a Reply

CommentLuv Enabled

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution. Please understand with hundreds of SPAM comments, it takes a while to sort through to approve the good comments. Sometimes, by accident, some good comments accidentally get marked as spam. Please let us know if your comment did not get posted. Also, if your comment has a link to it or anything else in it that would make it seem like spam, it will be deleted. So please post a real comment and not one that is only made to link to a site only. Otherwise, it could get deleted.