Community discussion forum
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
-
You can do this through the following code
<P>PAGE HEADER</P>
<P>Hello This is the first page</P><P>PAGE FOOTER</P>
<P style="page-break-before:always"></P><P>PAGE HEADER</P>
<P>Hello This is the second page</P><P>PAGE FOOTER</P>
There might by better way!!...but this can work also
-
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!
Thanks for the solution freakinawesome44... found very useful to me...
!--removed tag-->Post a reply
Related discussion
-
Contract: ActionScript/FlashBuilder Developer
by mattmeigs (2 replies)
-
CSS Drop down - Avoiding line break with div
by zarawebfx (1 replies)
-
How to get unique Bytes from a String ?
by FarhanBajwa (0 replies)
-
Menu.css corrupting my other theme.css
by Montague (0 replies)
-
AspTear in a form help
by spawn6991 (0 replies)
Related articles
Quick links
Recent activity
- James Crowley replied to I wanna developer in UK .
- Mihail Jvanecky replied to Converting flash files to EXE
- Mihail Jvanecky replied to Load flash movies directly ...
- Mihail Jvanecky replied to SDK for emulating a file system
- Mihail Jvanecky replied to DLL protection (embedd in o...
- Mihail Jvanecky replied to Effective tool for GDI memo...
Languages
Web Development
Frameworks & Architecture
Other major sections
Enter your message below
Sign in or Join us (it's free).