Reputation: 1188
I'm doing print layouts with HTML and CSS with AntennaHouse renderer.
A box in my content should have a top margin of 20pt. Easy:
margin-top: 20pt;
But the top margin should only be applied when the element doesn't stand at the beginning of a new page (when no page break is exactly before the element).
Does anyone have an idea how to do that?
XSL-FO solutions are welcome as well, as AntennaHouse has equivalent functions for FO and CSS rendering...
Upvotes: 0
Views: 304
Reputation: 8068
Try -ah-margin-break
(see https://www.antenna.co.jp/AHF/help/en/ahf-ext.html#axf.margin-break).
-ah-margin-break: discard
will discard "the margin on the before side of the block placed at the start of the document or right after the forced page/column break." I am not sure whether 'forced' covers a column/page break that was caused because the previous column/page was full.
Upvotes: 1
Reputation: 7905
Antenna House provides also some XSL / CSS extensions (additional properties or values). If you look at this documentation, http://www.antennahouse.com/product/ahf60/docs/ahf-ext.html#IDASJ5GB, you will find the -ah-margin-break properties that may answer your requirements.
Please note this is an non-standard feature (regarding XSL-FO and CSS specifications), available only in Antenna House Formatter.
Upvotes: 1