This question has been flagged
2 Replies
5045 Views

Hi I try to modify webkit-headers to fit my needs. I would like to place a header-image that spreads from the complete page from left to right. So I tried to set the margins in webkit-header to "0.00", but then margin is always about 1cm.

How is it possible to set the margin to 0 ?

I tried with a margin "0.01". Then it looks alomst as it should be but it is not 0 !

How can I place a header-image from left to right whith different text-margin, e.g. 1cm ?

Greetings René

Avatar
Discard

Have you tried a negative value? Or if you gives more precision to your value something like 0.0000001? It mights be ugly but I think 0.0 means False so you need to set something else than 0.

Best Answer

Hello,

You can set the margin for header as following in report's ".xml" file:

<html>
    <head>
        <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
        <script>
            function subst() {
            var vars={};
            var x=document.location.search.substring(1).split('&');
            for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
            var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
            for(var i in x) {
            var y = document.getElementsByClassName(x[i]);
            for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
            }
            }
        </script>
        <style type="text/css">
            ${css}
        </style>
    </head>
    <body style="border:0; margin:15  ;" onload="subst()">
        <table style="border-bottom: 1px solid black; width: 100%">
           <tr >
               <td style="text-align:right;font-size:12;" width="20%">${ helper.embed_image('png',company.logo,200,40)|n }</td>  (This is the header image. You can get it in complete page by set it's width)
               <td style="text-align:right;font-size:12;" width="80%"></br></br>${ company.rml_header1 }</td>
           </tr>
       </table> ${_debug or ''|n} </body>   
 </html>]]>

And you can set the margins for body data as following: <field eval="50.0" name="margin_top"/> <field eval="5.0" name="margin_bottom"/>

Thanks, Serpent Consulting Services.

Avatar
Discard
Best Answer

using css. with that you can put your pictures where you want

Avatar
Discard