Setting up A Print Stylesheet CSS For A Website [2018] | Blogging Tips

Learn to make your website Printer-friendly with CSS. Since it's really important to have a special CSS to print for any site in the case of a reader wants to print an article for reading it later offline. It usually becomes a secondary option for all webmasters and bloggers too in thinking of that, who actually takes the offline print-outs of published articles online. But, they forget to think that the reader can also be able to save your page in .pdf format too.
How To Set Up A Print Stylesheet For A Website 2018 — Choosing the best-selling SEO-Friendly themes is not enough, you also need to consider print stylesheet factor while choosing best template for your business. This is the ultimate guide for all the site owners to build the print stylesheet for their site. And this print stylesheet CSS also works fine with blogger as well. You can create a completely separate CSS stylesheet for printing purpose, beginning from scratch, or you can develop yourself the modern 'screen-targeted' styles. All this method is contained within CSS by defining print-specific styles by @media Rule. Why this stylesheet necessary? As that CSS stylesheet code is utilized for printing the web pages, when the visitor wants to print the web page for his reference. Learn how to set up a print style sheet, how to make your website Printer-friendly with CSS and make print styles using CSS3 @media queries. Follow all the steps to make a customized print style sheet in minutes.
Print Stylesheet CSS Trick for Blogger - Problogbooster
Print Stylesheet CSS : Blogging Tips
Also check: 5 Ways How Wearable Technology Will Improve Our Daily Life

What is print style sheet or print.css ?

Its a special CSS defined for a website by using which the reader can print it's particular webpage very clearly without exceeding more paper & ink.

Advantages :

  • Increase usability & accessibility: A reader/student can print it and use it for later references.
  • Decrease page loading: Still there are lots of visitors are on slow dial-up internet connection, who immediately go for printable version so that they have relevant information more quickly because such a slow internet connection causes very slow page loading to review the it online.

Disadvantage:

It increases page size for loading after adding this new CSS or if you add hyper-link then it one more request will add to you page loading.

How to view & debug print style sheet

Before you go, check the print preview of you current blog post page. And also check the print preview of this page.
  • For Firefox: Menu Bar >> File >> Print Preview
  • For Chrome : Right click on page >> Inspect element >> find setting button at right-bottom-corner >> check - Emulate CSS media.

How to build : print.css

Its really simple as that of we built the CSS for mobile template. You just need to know which part should be printed and which part should NOT be printed.

Lets Start

To start the making of print CSS, a special CSS-tag @media print is used to tell the browser that the current page is going to be printed.
@media print {
... ... ...
...user defined other tags...
... ... ...
}

Now list the parts of your page you dont want to print like menu, navigation, sidebar etc and place it in above mentioned tag like
@media print {
#menu, #nav, #sidebar, #sidebar-wrapper { display:none}
}

Make main wrapper content to full width:

#main-wrapper {width: 100%; margin: 0; float: none;}

Remove the background:

body { background: white; }
#container { background: transparent;}

Set font style and size

body { font:normal 14px Georgia, "Times New Roman", Times, serif; line-height: 1.5em; color: #222; }

Differentiate links and text

a:link { font-weight: bold; text-decoration: underline; color: #000; }

Print URL after links

a:link:after { content: " (" attr(href) ") "; }

Show Thank You message for a reader

body:after { display: block; content: "Thank you for printing our content."; margin-top: 30px; font-size: 11pt; color:#555; border-top: 1px dotted #555; }

Define page margin

@page { margin: 0.5cm; }

Final print stylesheet CSS

@media print {
#menu, #nav, #sidebar, #sidebar-wrapper { display:none}
#main-wrapper {width: 100%; margin: 0; float: none; }
body { background: white; }
body { font:normal 14px Georgia, "Times New Roman", Times, serif; line-height: 1.5em; color: #222; }
#container { background: transparent;}
@page { margin: 0.5cm; }
a:link { font-weight: bold; text-decoration: underline; color: #000; }
a:link:after { content: " (" attr(href) ") "; }
body:after { display: block; content: "Thank you for printing our content."; margin-top: 30px; font-size: 11pt; color:#555; border-top: 1px dotted #555; }
.noprint { display:none }
}

Above sample is just for learning purpose. For every blogger there is different style sheet for each.

Avoid extra stuff to be printed

In above example if you observe, you will get notice the CSS code .noprint. While I was working on this I notice some widgets are still get printed and its really unwanted and annoying on paper. So special CSS class is defined to avoid that extra stuff from paper. What you need to to is just put your unwanted html code as;
<span class='noprint'>
...your unwanted extra stuff...
</span>
And define that class do display: none in stylesheet CSS.
  • More: you can use this CSS code in cascading to your regular blogger CSS before <skin> tag or if you want you can also use following hyperlink as per your convenience
    <!-- Print Stylesheet CSS -->
    <link rel="stylesheet" href="URL to your print.css" type="text/css" media="print" />
Now start to build your own stylesheet for your lovely weblog site and make it more readable, accessible, usable online and offline too.
If you enjoyed this article, please share it with your friends and help us spread the word.

Next Post Previous Post
But before you read the page, I just want to tell you that; you can now convert every visitor & every impression in $$$ with the most advanced & reliable monetization platform that having highest fill rate & the best payouts in the industry.
ADTR Network

One day approval. Monetize your traffic from day 1, with 100% fill rates, higher CPM, & quick payouts. Register to Start Earning Right Now →

Join
ADTR Network
Now

New AI-Powered Content Marketing Toolkit
Rated 5/5 stars in 10,000+ reviews. Stay ahead of the competition with next-gen tech adoption by optimizing content for the target audience to drive 3x faster results. Act now to gain a competitive edge in the market.

ADTR

Improve Revenue, Performance,
&
Grow Traffic Faster

Join Adsense Certified Ad Partner
"ADTR is a must have automatic testing tool for serious publishers."
300% Rise
in AdSense Earnings
Get results from Day 1
It's FREE
Read The Case Study

Testimonials

Client Name 1

I joined PBB when I started blogging 6 years ago. It was my go-to resource for just about ANYTHING!! Without it, I would not have continued down this journey. Having the support, motivation and resources available when you’re in such a lonely profession like blogging is crucial to success. Thank you PBB for helping me turn my passion into a full-time career!!!.

Nikhil Agarwal
Client Name 2

Thank you! After many years of dreaming and enjoying the beauty and insight from numerous blogs I found the courage to start one myself. I could not have done it with your step-by-step guidance! Thank you so much for Pro Blog Booster, for your patient instructions, and for your nudge to publish before it is perfect! I have a long way to go, but am excited to be tippy-toeing into the blog world!

Nandhini Sinha
Client Name 3

I highly recommend ProBlogBooster to any new tech blogger. I began my journey several years ago. The site holds a wealth of information and is both inspiring and educational. They keep up-to-date with the latest standards and trends bringing key information to help you start and grow your technology blogging business. The tech tuts are very in details and the support you receive will help to overcome any challenges along the way. Again, I highly recommend PROBLOGBOOSTER as your companion for tech blogging!

Arnab Tamada
Client Name 4

Problogbooster is awesome. If you’re serious about taking your blog to the next level then there’s no better blog. It has given me the confidence to keep growing my eCommerce site and view it as a serious business.

Matt Flynn

Disclaimer

We are a professional review site that operates like any other website on the internet. We value our readers' trust and are confident in the information we provide. The post may contain some affiliate/referral links, and if you make a purchase through them, we receive referral income as a commission. We are unbiased and do not accept fixed marketing articles or fake reviews. We thoroughly test each product and only give high marks to the very best. We are an independent organization and the opinions/views/thoughts expressed here are our own.

Privacy Policy

All of the ProBlogBooster ideas are free for any type of personal or commercial use. All I ask is to keep the footer links intact which provides due credit to its authors. From time to time, we may use visitors/readers, information for distinct & upcoming, unanticipated uses not earlier disclosed in our privacy notice. If collected data or information practices changed or improved at some time in the future, we would post all the policy changes to our website to notify you of these changes, and we will use for these new purposes only data collected from the time of the policy change forward. If you are concerned about how your information is used, you should check back our website policy pages periodically. For more about this just read out; Privacy Policy