Creating a print.css stylesheet- where to put the call in the header?

edited December 2016 in Theme support

I am trying to locate the following in the header.php file:

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>"
type="text/css" media="screen" />

So that I can add 'print' to the call and make a stylesheet for printing posts without headers, footers, sidebars etc. The media="screen" I would change to media="screen, print". 

Any help would be greatly appreciated.

Regards,

Nick 

Comments

  • Hi,

    what you ask for, requires files customization what in reference to Item Support Policy is not allowed. So if you want to modify files and don't know how, you should contact with your web developer.

    Thanks!
  • Ok, I was looking for some advice on location of the <link> in the header.  When using firebug I see that there is an @media print { .gm-style .gmnoprint, .gmnoprint {display:none;}}

    I would like to add some css so that when the browser prints it does not output the header or footer.  I tried the following in the custom css (in betheme options) but it did not work:

    @media print {
    body { background:white; color:black; margin:0; }
    #header {display: none !important;}
    #footer {display: none !important;}
    }


  • Sorry but this time we completely do not understand what you mean and would like to do.
  • Ok, my apologies.  I will start over.  I would like to use a browser (IE, Chrome, Firefox) to print a post.  However I do not want to print the header or footer for the post- just the body.  I realize a print.css file could be added but I tried to add @media print to the css to tell the browser what to print- with no success.  Any ideas on how to modify what is printed via the browser?  
  • So this is what we thought you would like to do but like we wrote above, we do not have any css solution to make it possible and this requires files customization.
Sign In or Register to comment.