Page 1 of 1

CSS-Based PDF - Creating solid color headers

Posted: Fri Nov 09, 2018 11:43 pm
by mdslup
I'm using the @page element (via @top-left, @top-right, @top-left-corner, @top-right-corner) with a gray background color to create a solid header the spans the width of the page.

However, in order to get it to cover the whole width of the page, I have to the @page margin-left and margin-right to be 0.0in. Whenever I change the margins (for example, to 0.2in), the header no longer goes all the way across the page - it results in gaps on the sides, equal to the size of the margin.

Any tips on this?

Re: CSS-Based PDF - Creating solid color headers

Posted: Mon Nov 12, 2018 11:12 am
by Dan
Hello,
If you set the margins of a page size to zero, the page margin boxes from that side will not be visible.
In general, if you want to style the header of the page, we recommend using a background image set on the entire page, as explained here:

https://www.oxygenxml.com/doc/versions/ ... und_images

If you are using Chemistry from DITA-OT, please read:

https://www.oxygenxml.com/doc/versions/ ... aid-title6

Let us know if you need more information.

Many regards,
Dan