In essence, I want to make a sidebar that takes the place of the traditional header. I'd like to have the typical header elements: page numbers, string-set values, static text, and images in the sidebar. I can create a header beautifully with the @page-top attributes, but I got stuck trying to mimick the same thing with a sidebar.
This is what I have so far. It repeats but not with the dynamic content (page counter).
Any suggestions?
This is what I have so far. It repeats but not with the dynamic content (page counter).
<html>
<head>
<style>
@page {
margin-left: 0in;
@top {
content: flow(header);
}
}
#header {
float: left;
clear: left;
margin: -0.75in 0.2in 0in -1.25in;
width: 2.0in;
font-size: 10px;
font-style: normal;
color: gray;
text-indent: 0em;
padding: 0.5em;
text-align: right;
page-break-inside: avoid;
border-right: 0.5px solid gray;
height: 10.25in;
prince-flow: static(header); /* use the header flow as content */
}
#line1 { font-weight: bold }
#line2 { font-style: italic }
#line3 { font-size: 24px; text-align: center }
div.chapter { page-break-before: always; margin-left: 2.5in; }
div.chapter { string-set: headers content(); }
#pagenumber { content: counter(page); }
</style>
</head>
<body>
<div id="header">
<div id="line1">This is the first line of the header (bold)</div>
<div id="line2">This is the second line of the header (italic)</div>
<div id="line3">This is the third line of the header (big, centered)</div>
<div id="pagenumber"></div>
</div>
<div class="chapter">First chapter of the document.</div>
<div class="chapter">Second chapter of the document.</div>
</body>
</html>
Any suggestions?
John Clarke
Cornerstone Systems Northwest Inc.