Forum Bugs

Page Areas

Ben
It all started with trying to get a footer in the @bottom selector in a page, and a page number in the @bottom-left and @bottom-right selectors in a page. Here is the CSS:

@page {
  size: A4;
  margin-top:54pt;
  margin-bottom:54pt;
  margin-inside:72pt;
  margin-outside:170pt;
  page-policy:last;
  @bottom
  {
    border:solid 1px yellow;
    margin-inside:0pt;
    margin-outside:0pt;
    content:'Footer';
    font-family:"Futura Lt BT";
    font-size:8pt;
    text-align:inside;
  }
}
@page:left {
  @bottom-left
  {
    border:solid 1px blue;
    margin-inside:0pt;
    margin-outside:-150pt;
    content:'Page';
  }
}
@page:right {
  @bottom-right
  {
    border:solid 1px blue;
    margin-inside:0pt;
    margin-outside:-150pt;
    content:'Page';
  }
}


This should display the word 'Footer' in the @bottom of each page, and the word 'Page' should appear in the outside corner of each page. However, it doesn't. The blue border displays properly, but with no word. Moreover, if you change the "margin-inside" and "margin-outside" to their respective sides for the @page-right and @page-left selectors (for example, margin-inside = margin-left for @page-right), the borders become messed up.

Another variation of the css yields an even stranger result. If you replace the two instances of margin-outside:-150pt in the @bottom-left and @bottom-right with margin-outside:0pt, then the @bottom block shrinks on the inside, inversely with the size of the text in the 'Page' block. This doesn't make any sense???
Any help??
mikeday
That's interesting, I don't think anyone has ever tried using negative margins on page margin boxes before!

We'll take a look at it and see what is going on.
Ben
Well, if you have any ideas on how to get a footer in the bottom center of a page, and an alternating outside page number in the lower outside corner of each page, let me know. That's my main goal, would be nice to do it the best way possible! I'm open to any suggestions...
Thanks
Ben
Ben
Also, to clarify, another issue is that named pages automatically take on attributes of the general page if no attribute is defined. For example:

@page {
margin-top: 50pt;
}
@page testpage {
margin-bottom: 50pt;
}


In this case, the named page "testpage" will have both a top and bottom margin. Is it supposed to function this way? I can see the benefits of having the test page "copy" unnamed attributes from the generic page, but I just wanted to clarify functionality...
xuehong
Hi Ben,

You can use corner margin boxes instead of using negative margins:

@page:left {
    @bottom-left-corner { content: 'Page' }
}
@page:right {
    @bottom-right-corner {content:'Page' }
}


Cheers! :)