print stylesheet, one page prints and cuts off remaining text

后端 未结 12 999
攒了一身酷
攒了一身酷 2020-12-24 00:41

I\'m working on a printable list of events, the printer prints one page fine, but cuts off some of the text on the bottom, then it print a second blank page

I\'ve tr

12条回答
  •  离开以前
    2020-12-24 01:28

    I found that setting display: inline on container divs also helped. Some of these great answers here have worked for me in certain situations while in others no.

    Some long text that gets cut off at the end of the page...

    Most people set containers to display block or inline-block. For me it was cutting off text, and setting it to inline circumvented that. This also makes width and height irrelevant for the offending container div; which I have found to be a nuisance when printing.

    @media print {
        .container {
            display: inline;
        }
    }
    

    Here is a great article that helped me with this solution.

提交回复
热议问题