Header and Footer in Web page print
-
Hi All,
while taking web page print out, I have to print customized header and footer.
Can anybody help me to do this?
Thanks in advance
-
Hi,
Thanks for your reply. but i want to set header and footer dynamically using mso attributes
-
Are you saying you want to dynamically add a header and a footer when someone prints the page? If so you can use the following css code, where the "header" and "footer" divs are invisible unless the page is being printed:
<style type="text/css">#header {visibility: hidden;}
#footer{visibility: hidden;}
@media print {
#header, #footer {visibility: visible;}
}</style>
<div id="header">Header Data Goes Here</div>
<div id="footer">Footer Data Goes Here</div>
If you want to add the header/footer dynamically after the page has loaded so it is visible onscreen try using the JavaScript innerHTML() method.
Hope I could be of any help!
-
Hi Is there a way through CSS to use different headers between the first page and the rest when printing multiple pages. We can use the attribute display:table-header-group; in the for example to print the same thead on all pages. But can we print different headers? Example: First page: header1 body Second Page: header2 body Third Page: header2 body . . . Any help is very much appreciated. Thanks!
Post a reply
JavaScript forum discussion
-
How to stop & start the scrolling text on mouseover & onmouseout event.
by codeunit (3 replies)
-
Header and Footer in Web page print
by fhajaj (4 replies)
-
Automatically check/uncheck multiple checkboxes
by gus (3 replies)
-
Re: HTML TABLE
by mikefenej (0 replies)
-
Re: HTML TABLE
by mikefenej (0 replies)
Quick links
Recent activity
- arif ahmad replied to How to receive data in web ...
- William Thompson replied to What is the name of the Win...
- Sameera Piyadigamage replied to Point of Sale Developers: H...
- Scott Carline replied to 4 x C# Developers for large...
- Rajendra Dhakal replied to Restore SQL Server text dat...
- cloud rainda replied to How to convert between TS f...
Contribute
Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!
Web Development
Developer Jobs
Our tools
We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.
-
Enter your message below
Sign in or Join us (it's free).