Hello,
The Header and Footer margins are relative to the page margin when we use the @top, @bottom attribute?
For example in this case (html pasted below) the layout is:
------------------------------
Header Header
Body Body
Footer Footer
------------------------------
Now when I change to @top-left-corner, @bottom-left-corner it comes but one Header is missing since it allows only corner.
------------------------------
Header
Body Body
Footer
------------------------------
Question is
1) How do I make @top not use relative positioning? It should start from the margin specified.
2) Is there an alternative way you could suggest?
3) Prince 8.x didn't behave like this? We were using Prince 8.x earlier, now migrating to Prince 10.x
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<style type="text/css">
@media print {
#header_content {position: running(header);}
#footer_content {position: running(footer);}
#first_page_content {position: position(first_page);}
#landscape {page: landscape;}
@page {
size: LETTER Portrait;
margin-left: 0.5cm;
margin-right: 0.5cm;
margin-top: 1.0cm;
margin-bottom: 1.0cm;
@top {
float-top: next;
margin-left: 0.5cm;
margin-right: 0.5cm;
height: 1.0cm; content: element(header);
}
@bottom {
margin-right: 0.5cm;
margin-left: 0.5cm;
height: 1.0cm; content: element(footer);
}
}
}
</style>
</head>
<body>
<div id="header_content"> Header Header </div>
<div id="footer_content"> Footer Footer </div>
<div id="body_content">Body Body</div>
</body>
</html>
The Header and Footer margins are relative to the page margin when we use the @top, @bottom attribute?
For example in this case (html pasted below) the layout is:
------------------------------
Header Header
Body Body
Footer Footer
------------------------------
Now when I change to @top-left-corner, @bottom-left-corner it comes but one Header is missing since it allows only corner.
------------------------------
Header
Body Body
Footer
------------------------------
Question is
1) How do I make @top not use relative positioning? It should start from the margin specified.
2) Is there an alternative way you could suggest?
3) Prince 8.x didn't behave like this? We were using Prince 8.x earlier, now migrating to Prince 10.x
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<style type="text/css">
@media print {
#header_content {position: running(header);}
#footer_content {position: running(footer);}
#first_page_content {position: position(first_page);}
#landscape {page: landscape;}
@page {
size: LETTER Portrait;
margin-left: 0.5cm;
margin-right: 0.5cm;
margin-top: 1.0cm;
margin-bottom: 1.0cm;
@top {
float-top: next;
margin-left: 0.5cm;
margin-right: 0.5cm;
height: 1.0cm; content: element(header);
}
@bottom {
margin-right: 0.5cm;
margin-left: 0.5cm;
height: 1.0cm; content: element(footer);
}
}
}
</style>
</head>
<body>
<div id="header_content"> Header Header </div>
<div id="footer_content"> Footer Footer </div>
<div id="body_content">Body Body</div>
</body>
</html>