page-break

Prevent Page Break between 2 div elements

半世苍凉 提交于 2019-12-07 08:10:28
问题 I'm having quite the problem now. It's only bothering in Firefox (Testing with FF10), this bug doesn't happen in Chrome 17 or any IE. Here's the thing. I have a page architecture looking like this <div id="container"> <div id="a"> <img src="foo/bar.png" /> </div> <div id="b"> <div id="c"> <!--short content--> </div> <div id="d"> <!--long content--> </div> </div> </div> EDIT: Some asked for the a part of the CSS. My code here being simplified a lot, here's a simplified version of the css to

How do I keep a <td> element from appearing across multiple pages when printed from IE?

亡梦爱人 提交于 2019-12-06 02:46:09
问题 I have an HTML table of data where each cell can have multiple lines of text. When the table is printed, it's possible for a row to be broken up so that some of the data appears at the bottom of the first page and some appears at the top of the next. Is there an equivalent to Word's "keep together" functionality that will prevent a page break from happening within a table row? I would think this would be a common problem, but the only "answer" I could find was hidden on a certain hyphenated

{page-break-after: always} not working when printing

陌路散爱 提交于 2019-12-05 19:45:36
问题 EDIT: I just noticed this works in IE9, but not IE10 and Chrome. We receive HTML formatted PO reports from one of our suppliers electronically. We usually print these and before it would put 1 PO per page, but now it is not adding the page breaks. I checked the html and I can't see why it wouldn't work all of a sudden. This is the (poorly formatted) html: <HEAD> <STYLE TYPE='text/css'><!-- BR.breakhere {page-break-after: always} .tb1{font:10pt Arial;} .tb2{border-left:1px solid #000000;

Prevent Page Break between 2 div elements

只愿长相守 提交于 2019-12-05 10:04:49
I'm having quite the problem now. It's only bothering in Firefox (Testing with FF10), this bug doesn't happen in Chrome 17 or any IE. Here's the thing. I have a page architecture looking like this <div id="container"> <div id="a"> <img src="foo/bar.png" /> </div> <div id="b"> <div id="c"> <!--short content--> </div> <div id="d"> <!--long content--> </div> </div> </div> EDIT: Some asked for the a part of the CSS. My code here being simplified a lot, here's a simplified version of the css to match. #container { margin: 0 auto; position: relative; width: 1000px; } #a{ height: 156px; margin: 0

How do I prevent a blank last page?

我是研究僧i 提交于 2019-12-05 08:25:37
I am iterating over a list of objects. With each iteration I build and populate a table which contains the content of a single page. I am using CSS to add a page break after each table. table { page-break-after: always; } This works great, except that I am always getting a blank last page. Which I assume is due to the last table iteration applying a page break. I have tried. table { page-break-after: always; } table { page-break-after: auto; } table { page-break-after: left; } table { page-break-after: right; } However, I always get that blank last page. Is there another method of inserting

Conditional Page breaks at group level in SSRS2008 R2 reports

南笙酒味 提交于 2019-12-04 20:17:25
问题 I have a report in SSRS 2008 R2. This report consists of one table containing several grouping levels. If the customer requests to see all the detail them I want a page break at the second grouping level of the table. If only the summary details are requested then I do not want the page break as that will cause unnecessary paging. How can I conditionally control the page break at the group level in a table? The summary details are calculated and returned differently from the sql so I do not

Work around for page-break-inside:avoid

血红的双手。 提交于 2019-12-04 11:45:25
I am currently working on printing something. I have a dynamic page where it has variable numbers of block level elements. Some may be 1 line, and some may be 100+ lines. <div class='myclass'><span id="id1">1</span>text 1 line....</span></div> <div class='myclass'><span id="id2">2</span>text 10 lines....</span></div> <div class='myclass'><span id="id3">3</span>text 3 lines....</span></div> <div class='myclass'><span id="id4">4</span>text 100+ lines....</span></div> ... I know the page-break-inside:avoid; when it is implemented (supported by Opera, Chrome, and IE7+ in strict html mode only)

{page-break-after: always} not working when printing

孤者浪人 提交于 2019-12-04 02:37:50
EDIT: I just noticed this works in IE9, but not IE10 and Chrome. We receive HTML formatted PO reports from one of our suppliers electronically. We usually print these and before it would put 1 PO per page, but now it is not adding the page breaks. I checked the html and I can't see why it wouldn't work all of a sudden. This is the (poorly formatted) html: <HEAD> <STYLE TYPE='text/css'><!-- BR.breakhere {page-break-after: always} .tb1{font:10pt Arial;} .tb2{border-left:1px solid #000000; border-right:1px solid #000000;border-top: 1px solid #000000;border-bottom: 1px solid #000000;} .tb3{font

How do I avoid a page break immediately after a heading

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 22:14:40
I have an HTML 4.01/CSS 2.1 document that includes an H3 heading followed by a short (one line) paragraph block and then an unordered list with several items: <h3>Heading!</h3> <p>Some things:</p> <ul> <li>Thing one</li> <li>Thing B</li> <li>Thing 4</li> </ul> My problem is that when I print the document (or render it as a PDF using wkhtmltopdf ), sometimes a page break will occur right after the heading, before the paragraph, which looks quite silly. Is there a way to stipulate that page breaks should be avoided immediately after a header? (I'm not averse to HTML5/CSS3 solutions, if that

Conditional Page breaks at group level in SSRS2008 R2 reports

心不动则不痛 提交于 2019-12-03 12:42:28
I have a report in SSRS 2008 R2. This report consists of one table containing several grouping levels. If the customer requests to see all the detail them I want a page break at the second grouping level of the table. If only the summary details are requested then I do not want the page break as that will cause unnecessary paging. How can I conditionally control the page break at the group level in a table? The summary details are calculated and returned differently from the sql so I do not want to hide rows, just turn page break on or off. You can use expression based page breaks, which,