Forum How do I...?

Problem with div and page break

Spidored
Hello all,

I explain my problem with a little image (see attached)

The case is : i got a header (in blue)

And some div's auto generated (grey) with a note (grey red-rounded)

so imagine the html :
<div class="container">
<div> GREY CONTENT </div>
<div> GREY NOTE RED-ROUNDED </div>
</div>

Sometimes when the whole container is set in the bottom of a page and is a little to big to be printed on the page it will page break.
But it just put the "Grey note red-rounded" to the second page and the grey content stay on the first page.

Is there a way to set them "grouped" and so prince will do a page break automaticly before the grey content and put the whole div on the second page ?

Thanks in advance ,

Edwin.
  1. ProblemPrince.png6.4 kB
    problemdivpagebreak
mikeday
Apply "page-break-inside: avoid" to the container div.
Spidored
thanks, it worked :)