Forum How do I...?

Style right and left column elements differently

web559
Is it possible to use different styles for a given element depending on whether it falls in the left or right column?

Here is my use case: My two-column document contains multiple floated images, and on all pages I'd like the images in the left column to float left, and the ones in the right column to float right.

I'm imagining something that would work like this:
@column:left {
    img { float: left; }
}
@column:right {
    img { float: right; }
}


Is there a way to get this effect in Prince?
mikeday
No, not at the moment. You can do something similar for pages, using float: inside | outside, but not columns.
schwarzh
I would like to add a +1 for interest in the ability to do this for future releases of PrinceXML.

If this issue were fixed, would one also be able to specify break-after: avoid-page on the right column, but not the left column? If so, I'm even more interested in a way to specify different styles for left and right column.

Is this something that Prince is considering doing sometime in the near future?

Thanks,
Brad
mikeday
We will add this to the roadmap for investigation after the release of Prince 9.0.
schwarzh
Ok, thanks Mike.