Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
6239 Lượt xem

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é

Ảnh đại diện
Huỷ bỏ

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.

Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 3 15
6623
1
thg 3 15
4981
3
thg 3 15
7453
1
thg 3 15
6123
0
thg 3 15
3889