margin inside/outside for CSS Paged Media rendering in AntennaHouse

325 Views Asked by At

I'm doing print layouts with HTML and CSS with AntennaHouse renderer.

A box in my content should have a left margin of 20pt on left pages and 10pt on right pages.

/* on left hand pages */
margin-left: 20pt;
margin-right: 10pt;

/* on right hand pages */
margin-left: 10pt;
margin-right: 20pt;

So the outside margin of the box should be 20pt and the inside margin 10pt. Basically I'm looking for a syntax like this (which doesn't exist):

/* pseudo code */
margin-outside: 20pt;
margin-inside: 10pt;

Does anyone have an idea how to do that? And if yes, is there an equivalent for padding inside/outside?

XSL-FO solutions are welcome as well, as AntennaHouse has equivalent functions for FO and CSS rendering...

1

There are 1 best solutions below

0
On

If you use PrinceXML, it definitely supports margin-inside and margin-outside. I used it for laying out a novel:

@page {
  size: 6in 9in;
  margin-inside: 0.75in;
  margin-outside: 0.625in;
  margin-top: 1in;
  margin-bottom: 1in
}