Forum How do I...?

avoid breaks in columns?

Anonymous
Is there any way to specify that a block element cannot be split between columns on a multi-column page? I haven't seen a property that addresses this, but I thought I'd ask.
mikeday
Currently this is not possible, unless you wrap everything up in an unbreakable thing like an inline-block to inhibit splitting, but this is probably not what you want.

In the future we will most likely extend the page-break-before and page-break-after properties to apply to multicolumn layouts in a similar manner to the way they apply to page breaks.
Anonymous
Actually, I created a dummy wrapper element with its display set to inline-block and I got exactly what I needed.

Thank you so much. You have excellent tech support and you have saved me from having to learn xsl:fo once again. I choose to remain blissfully ignorant of xsl:fo, thanks to Prince.

Pat Breslin
mikeday
Actually, I created a dummy wrapper element with its display set to inline-block and I got exactly what I needed.

Great, I'm glad it helped! :)

Thank you so much. You have excellent tech support and you have saved me from having to learn xsl:fo once again. I choose to remain blissfully ignorant of xsl:fo, thanks to Prince.

Thanks for the kind words -- is there any chance we could quote you as a testimonial for Prince?
ewlarson
mikeday wrote:
In the future we will most likely extend the page-break-before and page-break-after properties to apply to multicolumn layouts in a similar manner to the way they apply to page breaks.


Hi all,

We are using a multi-column layout with the following style rule:
h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }

The page-break property does not extend itself to h's within the multi-column div. Is there anyway to hack this into place?

Cheers,

Eric Larson

mikeday
The page-break property does not extend itself to h's within the multi-column div. Is there anyway to hack this into place?

Not really, unless you use the inline-block workaround described earlier in this thread.

We are planning to release a new version of Prince early next year that will apply the "page-break-after/before: avoid" properties to control column breaking as well as page breaking.

Best regards,

Michael
sgraber
Is there any ETA when this feature will be implemented in Prince? I'm on hold with Prince until I can make headers break properly on multi-column pages.

Thanks,

Shane
mikeday
Hi Shane,

We will be releasing an alpha version of Prince with column breaking functionality very soon, either this week or next week.

Before that we will be making a quick maintenance release for Prince 5.1 that fixes several minor issues that were reported by people here on the forum.

Best regards,

Michael
sgraber
Awesome. I'll be downloading both and let you know how it goes. :)

With respect to column/heading breaking, will there be any new style types to be added to headings so that they respect the column rules?

Shane
mikeday
The XHTML heading elements (h1 .. h6) all have "page-break-after: avoid" set in the default XHTML style sheet, which will also inhibit column breaks immediately after headings.
Anonymous
I am new to Prince, and using CSS for print. However, I do use CSS extesively in my web work. That being said, I just wanted to make a point on the specifications.

Though I do not believe it is currently supported in Prince, the proper way to avoid Column breaks, is to use column-break-after and column-break before,
according to W3C's CCS3 Multi-Column support.

Although at the time of this written, it is not a normative specification, It does show give good indication on how things will be going. So when Prince chooses to add the support, my opinion is that it will be done accourding to this specification.

-Tyler
(Just my two cents)
mikeday
For the record, we have released a new alpha version of Prince that extends the page-break-after/before/inside properties to apply to content with columns, allowing the inhibition of column breaks. It also includes a number of other new features for columns, floats, footnotes and more! :)