Skip to main content
August 19, 2013
Question

removing header/footer from CHM printout WITH code

  • August 19, 2013
  • 1 reply
  • 1182 views

How can I remove the header and footer of a CHM printout (from the PRINT button) with HMTL code?

I've tried adding this to the CSS style sheet but it doesn't work:

<style type="text/css">
@media print{
  body
{ background-color:#FFFFFF; background-image:none; color:#000000 }
 
#ad{ display:none;}
 
#leftbar{ display:none;}
 
#contentarea{ width:100%;}
}
</style>

This topic has been closed for replies.

1 reply

Captiv8r
Legend
August 19, 2013

Hi there

I'm not sure that's possible. Because it's the browser that would be controlling it, no?

I suppose you might try using Google to see if anyone has a generic solution for removing or suppressing the header or footer when printing from IE. If that exists, then it should also apply to CHM, as IE is used for the CHM viewer.

Cheers... Rick

Willam van Weelden
Inspiring
August 19, 2013

This does the trick for WebHelp, so I won’t be surprised if it’ll work in CHM as well:

@media print {

div#header { display: none; }

}

Greet,

Willam