Title: print.css
Last modified: October 23, 2018

---

# print.css

 *  [oekoplatt](https://wordpress.org/support/users/oekoplatt/)
 * (@oekoplatt)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/print-css-3/)
 * Hi xnau,
    I want to print labels from the records, but the styles I defined in
   own css / printing styles are ignored. Result is the same as on computer monitor.
   But on labels I don’t need page header an title. Is it possible to use different
   styles for printing? How?
 * Thank you

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/print-css-3/#post-10808598)
 * In the plugin settings, under the “Custom CSS” tab, there is a space for print
   sheet rules.
 *  Thread Starter [oekoplatt](https://wordpress.org/support/users/oekoplatt/)
 * (@oekoplatt)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/print-css-3/#post-10811444)
 * Sorry, but obviously my re-translation of “Custom CSS” into “own css” was wrong.
   
   But: My css-rules in “Custom CSS” / “space for print sheet rules” are not executed.
   When I put in in my custom template (adapted from [https://xnau.com/using-the-pdb_template-helper-class-in-a-custom-list-template/](https://xnau.com/using-the-pdb_template-helper-class-in-a-custom-list-template/))
   after
 *     ```
       <?php // this is an example of a way to style the records, delete this or edit as needed ?>
       <style type="text/css">
         section {
           margin: 1em 0;
         }
       ```
   
 *  they are executed…
    The rules are:
 *     ```
       @media print {
       h1, 
       h2, 
       h3, 
       h4, 
       h5,
       .site-header,
       .widget_template_part,
       .template-part-site-branding,
       .template-part-main-nav,
       .entry-header,
       .page-header,
       .entry-title,
       .page-title,
       .print-link {
           display:none !important;
           width: 0 !important;
           height: 0 !important;
           overflow: hidden !important;
           line-height: 0pt !important;
           white-space: nowrap;
       } 
       }
       ```
   
 * What is the explanation?
    Thank you
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/print-css-3/#post-10812375)
 * Those CSS rules are probably added by your WP theme. In the HTML inspector, it
   will tell you the source of the CSS rules.
 *  Thread Starter [oekoplatt](https://wordpress.org/support/users/oekoplatt/)
 * (@oekoplatt)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/print-css-3/#post-10812550)
 * It’s the same situation with the themes Twenty8teen and Twenty Sixteen… Both 
   themes have media query (@media print {…}) in their style.css. The rules work
   in the custom template but not in the Custom CSS of the plugin.
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/print-css-3/#post-10812610)
 * If the theme is adding CSS rules that you don’t want, you need to add CSS that
   overrides them in the custom CSS.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘print.css’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Roland Barker](https://wordpress.org/support/users/xnau/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/print-css-3/#post-10812610)
 * Status: not resolved