Forum How do I...?

flow

marjan
I am using princexml version 9.05 on linux (mint)

I am having troubles with a couple of features from princexml. I can't get flow content working:
@page {
 @bottom-left {
        content: flow(footer);
    }
}
#footer {
  flow: static(footer);
}

and in content I have:
<div id="footer">De Stad Kennen, de Stad Maken, {{ book.title }}</div>



The same happened with page-break-before:left
I wanted to have each chapter on the same even or oneven page but I could not get it to work.

These two things made me think something is wrong with the linux install ?
mikeday
That looks like it should work. Do other CSS properties work, eg. font or color properties?
marjan
Yes other css works, including prince specific styling like page counter. Normal page-break-before and after also works. But I can't get chapters to start on odd pages and can't get the flow working :-(
mikeday
The footer div will need to be near the beginning of the document, not the end. Regarding the page breaks, which elements are you applying the page-break-before: left to?
marjan
Well that tip really helped :)
I moved the footer to the top of the document and now it shows in the footer of every page!

I hope the page-break-before is equally simple to fix ;-)
I added page-break-before:left with every chapter

mikeday
Is the chapter a block element, eg. <div>?
marjan
Yes it is,

I have a big element chapters and within several divs with class chapter:
 <div class="chapters">
                {% for chapter in chapters %}
                    <div class="chapter">
                        {% get_chapter_content_by_chapter chapter %}
                    </div>
                {% endfor %}
            </div>
mikeday
And you have .chapter { page-break-before: left }, that should definitely work.

Are there any other page-break-before/after properties in your style sheet that could be interfering?
marjan
Well I do have several 'avoids' in my stylesheet to prevent awkward page-breaks. Could that be the reason?

Edited by marjan

mikeday
Possibly. You could try commenting them out?
marjan
table,li{
    page-break-inside: avoid;
}
.subscript{
    display: block;
    margin: 0 0 15px 0;
    page-break-before: avoid;
}

heading {
    page-break-after: avoid;
}

h3, h4, .bold.italic {
    page-break-after: avoid;
}

Edited by marjan