开发者

Printing a webpage with varying div sizes

Is there any way to make it so divs do not get cut in half when printing multiple pages? There are divs that I am trying to print that vary in size and I would like it to print so that none of them are cut off and the full div boxes appear on a single page. Maybe there is a way to calculate the height of each div a开发者_JAVA技巧nd if one puts it over the height of the page, then put it on the next page? I know I could get the length of the text within each div and maybe do it that way, but how would I go about designating a div to be printed on another page?


Use the CSS property page-break-inside:

http://www.w3.org/TR/CSS21/page.html#page-break-props

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜