DOMPDF <div> tag as header and footer

两盒软妹~` 提交于 2019-12-11 07:55:48

问题


I need to create a header and footer on a tag using DOMPDF. How can I achieve this?

Assuming I have a header class like this one:

<div class='header'>
    <div>
        <img scr='image1.png' style="width:100px; height:150px" />
        <h1>This is header</h1>
    </div>
</div>

and a footer like this one

<div class='footer'>
    <div>
        <img scr='image1.png' style="width:100px; height:150px" />
        <h1>This is a footer. All rights reserved.</h1>
        <img src = image2.png style="width:100px; height:150px;">
    </div>
</div>

I want to create those <div> tags (class footer and class header) to create the DOMPDF header and footer.
Any suggestion is highly appreciated! Cheers!


回答1:


CSS :

position:fixed; 
top: 0; or bottom: 0;


来源:https://stackoverflow.com/questions/9130083/dompdf-div-tag-as-header-and-footer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!