{"id":711,"date":"2012-01-27T08:08:53","date_gmt":"2012-01-27T06:08:53","guid":{"rendered":"http:\/\/hen.co.za\/blog\/?p=711"},"modified":"2012-01-27T08:08:53","modified_gmt":"2012-01-27T06:08:53","slug":"hiding-parts-of-html-page-on-printing","status":"publish","type":"post","link":"https:\/\/hen.co.za\/blog\/2012\/01\/hiding-parts-of-html-page-on-printing\/","title":{"rendered":"Hiding parts of html page on printing"},"content":{"rendered":"<p>If you need to create a web page on which some parts should not be visible when it is printed (or even print-previewed) you can use the following CSS:<\/p>\n<blockquote><p><strong>@media<\/strong> print<br \/>\n{<\/p>\n<p style=\"padding-left: 30px;\">.notPrint<br \/>\n{<\/p>\n<p style=\"padding-left: 60px;\">display:none;<\/p>\n<p style=\"padding-left: 30px;\">}<\/p>\n<p>}<\/p><\/blockquote>\n<p>Then in the html you can specify something like this:<\/p>\n<p><span style=\"color: #0000ff;\">&lt;div class=&#8217;notPrint&#8217;&gt;This is not visible in printing&lt;\/div&gt;<\/span><\/p>\n<p>This is useful if you have things like buttons and other stuff that is not applicable when printing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you need to create a web page on which some parts should not be visible when it is printed (or even print-previewed) you can use the following CSS: @media print { .notPrint { display:none; } } Then in the &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/hen.co.za\/blog\/2012\/01\/hiding-parts-of-html-page-on-printing\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[9,123,303,25,124,125],"class_list":["post-711","post","type-post","status-publish","format-standard","hentry","category-development","tag-code","tag-css","tag-development","tag-html","tag-print","tag-printing"],"_links":{"self":[{"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/posts\/711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/comments?post=711"}],"version-history":[{"count":2,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/posts\/711\/revisions"}],"predecessor-version":[{"id":713,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/posts\/711\/revisions\/713"}],"wp:attachment":[{"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/media?parent=711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/categories?post=711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/tags?post=711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}