Forum How do I...?

column-break-before property

somnath
Hi,

I'm using v6 rev7 and have trouble using the column-break-before/after property. My code in html is as:

<div style="column-count: 2; column-gap: 1em; column-fill: auto;">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In viverra libero ac diam. Suspendisse euismod. Phasellus porta. Nulla lectus augue, tincidunt ac, euismod quis, eleifend at, nisl. Vivamus eget diam sit amet dolor facilisis gravida. Phasellus faucibus, magna et tincidunt rhoncus, nibh arcu ultrices odio, ac ornare dui ipsum eget nisl. Curabitur nec massa. Aliquam orci pede, convallis sit amet, bibendum eget, feugiat eu, magna. In hac habitasse platea dictumst. Mauris tincidunt nisl nec felis.
</p>

<div style="column-break-before: always;">Test</div>
<p>
In imperdiet mattis arcu. Pellentesque porta sem in urna. Quisque vitae nulla. Integer eget velit. Suspendisse neque nulla, eleifend quis, consectetur et, consectetur a, dui. Vivamus odio lorem, sagittis vel, pellentesque id, facilisis et, tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus pretium semper massa. Vestibulum arcu magna, interdum vitae, commodo in, pulvinar non, nisi. Nunc volutpat nibh id libero. Suspendisse dui.
</p>
<p>
Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; .....
</p>
</div>

Is this correct as it seems column-break property is not applied to the div with text "Test"?


Thanks,
Somnath
mikeday
This looks like a bug in Prince 6.0 rev 7, that was not present in rev 6. We will fix this promptly for the next release, sorry for the inconvenience.
mikeday
Today we have released Prince 6.0 rev 8, which fixes this bug affecting the column break properties. Thanks for letting us know about the issue. :)
sstanelle
Hi Mike,

I am using Prince 7.0, and I am trying to do something similar. But rather than break content between paragraphs, I am trying to break content between numbered list items. For example,
I would like to force the third list item below to the next column. However, it seems to ignore the column-break-before attribute and does nothing. If I use the page-break-before attribute, then the third item is correctly pushed to the next page and the numbering is maintained. Should I be able to do this? It seems like a reasonable thing to want to do. I will email you the complete html and css files that I am using.

Thanks for any help!

Scott Stanelle

<div style="column-count: 2; column-gap: 1em; column-fill: auto;">

<ol>
<li>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In viverra libero ac diam. Suspendisse euismod. Phasellus porta. Nulla lectus augue, tincidunt ac, euismod quis, eleifend at, nisl. Vivamus eget diam sit amet dolor facilisis gravida. Phasellus faucibus, magna et tincidunt rhoncus, nibh arcu ultrices odio, ac ornare dui ipsum eget nisl. Curabitur nec massa. Aliquam orci pede, convallis sit amet, bibendum eget, feugiat eu, magna. In hac habitasse platea dictumst. Mauris tincidunt nisl nec felis.
</li>

<div style="column-break-before: always;"></div>

<li>
In imperdiet mattis arcu. Pellentesque porta sem in urna. Quisque vitae nulla. Integer eget velit. Suspendisse neque nulla, eleifend quis, consectetur et, consectetur a, dui. Vivamus odio lorem, sagittis vel, pellentesque id, facilisis et, tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus pretium semper massa. Vestibulum arcu magna, interdum vitae, commodo in, pulvinar non, nisi. Nunc volutpat nibh id libero. Suspendisse dui.
</li>

<li>
Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; .....
</li>
</ol>

</div>
sstanelle
I incorrectly wrote "third list item" in my previous post. It is actually the second list item that I'm trying to force to the next column. Just wanted to clear that up.

Thanks,

Scott
mikeday
This looks like a bug, we will investigate.
sstanelle
Hello Mike,

I wanted to check with you if there has been any resolution regarding this bug.

Thanks!

Scott Stanelle
mikeday
It turns out that the issue is not specific to list items, and affects all elements that are not direct children of the element that establishes the multi-column layout. As a result, if there is a <div> with multiple columns containing an <ol> containing <li> elements and one of the <li> elements tries to break columns it won't work, due to the intervening <ol> element. We should be able to fix this in a future version of Prince, although at this point it's not clear if the fix will be ready for the beta we plan to release shortly.
mikeday
The beta is out, and the fix is in! The column break properties should work correctly on nested elements now.