{"id":316,"date":"2010-07-23T09:35:40","date_gmt":"2010-07-23T13:35:40","guid":{"rendered":"http:\/\/erics-test-lab.com\/?p=316"},"modified":"2010-07-23T09:35:40","modified_gmt":"2010-07-23T13:35:40","slug":"css-page-break-and-dont-print","status":"publish","type":"post","link":"https:\/\/www.esearing.com\/v2010\/2010\/07\/css-page-break-and-dont-print\/","title":{"rendered":"CSS &#8211; page break and dont print"},"content":{"rendered":"<p>Found this little CSS tidbit useful to day. I had output order entry records with multiple page detail. I wanted each page of the detail to print to its own sheet. The problem I faced was that the Top of the first page had a bunch of instructions that didn&#8217;t need to be printed with the order detail. So I used the media = print attributes to hide the area I did not want to print. I also used css to break the page between record details.<\/p>\n<p><code>&lt;style type=\"text\/css\" media=\"print\"&gt;<br \/>\n.dontprint{display:none; height:0;}<br \/>\n.pbreak{page-break-after: always;}<br \/>\n&lt;\/style&gt;<br \/>\n...<br \/>\n&lt;div class=\"dontprint\"&gt;<br \/>\n\/\/ Screen instructions<br \/>\n&lt;\/div&gt;<br \/>\n...<br \/>\n&lt;cfoutput query=\"q\"&gt;<br \/>\n&lt;div class=\"pbreak\"&gt;<br \/>\n \/\/ screen and print order detail pages here.<br \/>\n&lt;\/div&gt;<br \/>\n&lt;\/cfoutput&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Found this little CSS tidbit useful to day. I had output order entry records with multiple page detail. I wanted each page of the detail to print to its own sheet. The problem I faced was that the Top of &hellip; <a href=\"https:\/\/www.esearing.com\/v2010\/2010\/07\/css-page-break-and-dont-print\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,8],"tags":[],"class_list":["post-316","post","type-post","status-publish","format-standard","hentry","category-code","category-css"],"_links":{"self":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/posts\/316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/comments?post=316"}],"version-history":[{"count":0,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/posts\/316\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/media?parent=316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/categories?post=316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/tags?post=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}