Hi all,
Emon need for business, I have long searched the forum and also how to put in my quote and my bills a header and a footer.
And finally, I have an other working stream elements allowing me to meet my needs ...
Given the number of people seeking the same thing as me, I say it might be good to share my discovery.
It's simple and easy to implement
First, start by adding the beginning of your HTML the following:
- <style>
- html {margin: 0;}
- body {margin: 0;}
- div # printhead {
- display: block;
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- font-family: arial;
- height: 2em;
- }
- div # {fdiv
- position: fixed;
- width: 100%;
- bottom: 0;
- left: 0;
- text-align: right;
- font-family: arial;
- }
- # ftrspan span {
- display: none;
- }
- # pnoinftr span: after {
- counter-increment: Fpage0;
- content: counter (Fpage0);
- }
- div # {myCONTENT
- position: relative;
- top: 220;
- left: 0;
- width: 100%;
- height: 2em;
- font-family: arial;
- font-size: 12pt;
- color: black;
- }
- div # {mymarge
- padding-left: 40pt; padding-right: 40pt; font-family: arial; font-size: 12pt; color: black;
- }
- </ Style>
So here for an explanation:
- div # header block corresponds to the printhead
- div # fdiv corresponds to footer
- # pnoinftr span: after correpsond numéroi to display the current page
- div # myCONTENT correpsond to content
Just in the header, this element should be located immediately after the style elements defined above:
Mine correpsond this:
- <div id="printhead">
- <table border="0" width="100%" cellpadding="0" cellspacing="0">
- <tbody>
- <tr>
- <td width="100%" height="40pt" valign="top" colspan="2" style="background-color: rgb(53, 57, 68);">
- </ Td>
- </ Tr>
- <tr>
- <td width="70%" valign="middle" style="background-color: rgb(53, 57, 68);padding-left:40pt;">
- <img src="https://crm.zoho.com/crm/viewCompanyLogo?fileId=2569181000000018003&zgId=23830819" align="left">
- </ Td>
- <Td width = "30%" valign = "middle" style = "background-color: rgb (53, 57, 68), border-style: none none none solid; border-left-color: white; border-left- width: 1pt; padding-left: 10pt; color: white; font-size: 18pt ">
- <b> Organization.Organization $ {Name} </ b> </ br>
- <span style="font-size: 9pt;"> Organization.Street} $ {</ br> $ {Organization.Zip Code} $ {$ {} Organization.City Organization.Country} </ br>
- Tel: Organization.Phone} $ {</ span>
- </ Td>
- </ Tr>
- <tr>
- <td width="100%" height="10pt" valign="top" colspan="2" style="background-color: rgb(53, 57, 68);">
- </ Td>
- </ Tr>
- <tr>
- <td width="100%" height="10pt" valign="top" colspan="2" style="background-color: rgb(0,188,205);">
- </ Td>
- </ Tr>
- <tr>
- <td width="100%" valign="middle" colspan="2" style="background-color: rgb(0,188,205); padding-left:40pt;color:white;font-size: 30pt;">
- QUOTE No Quotes.Numéro $ {Quote}
- </ Td>
- </ Tr>
- <tr>
- <td width="100%" height="10pt" valign="top" colspan="2" style="background-color: rgb(0,188,205);">
- </ Td>
- </ Tr>
- </ Tbody>
- </ Table>
- </ Div>
I just put in my header the information that I wanted to appear on each page including:
- An image
- The name of my company
- Its address
- His phone
- The number of quotes
Turn now to the footer, it should be placed in any end of your HTML file
Mine is this:
- <div id="fdiv">
- <table border="0" width="100%" cellpadding="0" cellspacing="0">
- <tbody>
- <tr>
- <td width="100%" height="10pt" valign="top" colspan="3" style="background-color: rgb(0,188,205);">
- </ Td>
- </ Tr>
- <tr>
- <td width="30%" valign="top" style="background-color: rgb(0,188,205); padding-left:40pt;color:white;font-size: 9pt;">
- SARL with capital of € xxxxxxxxx </ br>
- SIREN: xxx xxx xxx </ br>
- EPA: xxxxx </ br>
- VAT: xxxxxxxx
- </ Td>
- <td width="50%" align="center" valign="top" style="background-color: rgb(0,188,205); padding-left:40pt;color:white;font-size: 9pt;">
- <span style="valign:top;"> A Group Company </ span>
- <img src="https://crm.zoho.com/crm/viewCompanyLogo?fileId=2569181000000018004&zgId=23830819" valign="top">
- </ Td>
- <td width="20%" align="right" valign="top" style="background-color: rgb(0,188,205); padding-right:40pt;color:white;font-size: 9pt;">
- $ {Quote} Quotes.Numéro Quote </ br>
- Page <span id="pnoinftr"> </ span>
- </ Td>
- </ Tr>
- <tr>
- <td width="100%" height="40pt" valign="top" colspan="3" style="background-color: rgb(0,188,205);">
- </ Td>
- </ Tr>
- </ Tbody>
- </ Table>
- </ Div>
I just put in my footer the information that I wanted to appear on each page including:
- Legal Information
- The name of the parent company
- The number of quotes
- The number ela current page
Content for now to put between the header and footer, it makes sense but it costs nothing to be redefined.
Attention, clarification, we will have a little play with the pages ie control your content.
You'll probably spend a bit of time before this end, for my part, I have done so:
- First page:
- Customer Information
- Information on the estimate
- Information on the composition of the estimate
- Terms of payment
- 2nd page:
- 3rd page:
- Fourth and following pages:
The content of the first page will be found in the div and said:
- <div id="mycontent">
- Content of my first page
- </ Div>
The other pages will be found in the div which reads:
- <div id="mycontent" style="page-break-before: always;">
- Content of my second page
- </ Div>
Style = "page-break-before: always;" will allow you to skip a page before the contents of the div and therefore reproduce in this new web page header and your footer.
I hope I have been able to provide answers to this issue
Do not hesitate to get back to me if you encounter problems with the proposed solution
Here are just attached the complete HTML code of my quote ;)