How can I prevent headers and footers printing when someone clicks the 'Print this page' button on website pages. By headers and footers I mean the website details, page numbers and date. My button code is:-
!--Start of page printer--> input type="button" value="Print this page" onclick="window.print()" title="Print this page"> !--End of page printer-->
Thank you Kemistri for your prompt reply. However, the headers and footers are not part of my web page. They are the headers and footers inserted by IE by default. In IE if you click File-->Page setup you will see
Header &w &b Page &p of P Footer &u&b&d
These web client commands print the web address, page number, date etc which takes up space on the printed page.
I hoped to temporarily have these turned off when someone prints my page. I think I am asking the impossible. Awestruck
It would have been helpful if you had described the problem more accurately - your post reads like you are asking about print stylesheets and, of course, most pages have headers and footers.
The print data, however, has nothing to do with a HTML and everything to with browser functionality. It is placed there by the browser. Some browsers allow print data to be customised or removed but we (rightly) have no control over that.
I did spell it out but perhaps not clearly enough.
My original post said:- "By headers and footers I mean the website details, page numbers and date".
None of my website pages have headers or footers.
Why worry? Because I try to get an order form to print out on one page rather than say a page and a quarter. To get the order form on one page, I need to eliminate some content on the order form because the IE header and footer take up valuable rows .
I must accept defeat on this one. Regards Awestruck