Forum How do I...?

Add chapters always to the right page?

riffmaster
Hi,

I have 2 chapters. chapter1 & chapter2. Both are declared as a @page like this

div.chapter1 { page: chapter1; }
div.chapter2 { page: chapter2; }

Now before I start chapter 2. I add

<div style="page-break-after: right;"></div>

If chapter1 ends on a right page, I automatically get a blank left page and then the chapter starts on the right. But when the chapter1 ends on a left page, I get 2 blank pages. How do I get rid of the 2 blank pages.

I know I'm missing something very silly.

Thanks for your help.
mikeday
How about adding "page-break-before: left" instead? I think that is easier to control.
riffmaster
Hi

I tried adding the properties like this

<div class="chapter1" style="page-break-after: right;" >

<div class="chapter2" style="page-break-after: right;" >

This seems to solve the problem. Thanks for the help :)
mikeday
Oh right, I didn't notice that the page break property was not being applied directly to the chapter. :)