How to deal with page breaks when printing a large HTML table

前端 未结 12 1845
有刺的猬
有刺的猬 2020-11-22 16:44

I have a project which requires printing an HTML table with many rows.

My problem is the way the table is printed over multiple page. It will sometimes cut a row in

12条回答
  •  孤街浪徒
    2020-11-22 17:31

    I faced the same problem and search everywhere for a solution, at last, I fount something which works for me for every browsers.

    html {
    height: 0;
    }
    

    use this css or Instead of css you can have this javascript

    $("html").height(0);
    

    Hope this will work for you as well.

提交回复
热议问题