I am using the following CSS to print web pages that display the pay-slip of all the employees in a firm:
<style media="screen">
div{
display:none;
}
div{
display:none;
}
</style>
<style media="print">
div{
display:block;
}
div{
display:block;
}
h3{
page-break-before:always
}
</style>
Internet Explorer 6.0 gives an option on Page Setup when the 'File' menu is clicked where there are 2 boxes in which one can specify the header & the footer where certain symbols are used (by IE) for denoting the headers & the footers. For eg. &u will print the URL on each page, &d will print the date on each page, &t will print the time on each page etc.. Also if anyone is using the Page Setup for the 1st time, he will already find some default symbols there. Since I guess many people are not aware of the presence of these symbols when the Page Setup is clicked, if they issue the Print command, they find that the URL of that web page or the current date or the current time gets printed as well which they don't want. Is there someway by which I can ensure that, even if the default symbols are present (say &u in the footer texbox which will print the URL at the bottom), the presence of these symbols will not print the unnecessary text by using a JavaScript function i.e. as per the &u example, the URL of the web page will not be printed in each & every page? Also can the top-margin, bottom-margin, left-margin & the right-margin be specified in the above CSS or by using any JavaScript function?
Thanks,
Arpan
<style media="screen">
div{
display:none;
}
div{
display:none;
}
</style>
<style media="print">
div{
display:block;
}
div{
display:block;
}
h3{
page-break-before:always
}
</style>
Internet Explorer 6.0 gives an option on Page Setup when the 'File' menu is clicked where there are 2 boxes in which one can specify the header & the footer where certain symbols are used (by IE) for denoting the headers & the footers. For eg. &u will print the URL on each page, &d will print the date on each page, &t will print the time on each page etc.. Also if anyone is using the Page Setup for the 1st time, he will already find some default symbols there. Since I guess many people are not aware of the presence of these symbols when the Page Setup is clicked, if they issue the Print command, they find that the URL of that web page or the current date or the current time gets printed as well which they don't want. Is there someway by which I can ensure that, even if the default symbols are present (say &u in the footer texbox which will print the URL at the bottom), the presence of these symbols will not print the unnecessary text by using a JavaScript function i.e. as per the &u example, the URL of the web page will not be printed in each & every page? Also can the top-margin, bottom-margin, left-margin & the right-margin be specified in the above CSS or by using any JavaScript function?
Thanks,
Arpan