Hello.
I am using named flows to put HTML content into the margins. It works well but I have a few questions.
Here is the structure of my HTML and CSS:
Now, the page counter in the top-right margin box works a treat, but the string content update for the H1 header name only works if the in_pdf_top_left div appears AFTER the H1, and even then it is not updated after a new H1.
If I remove the indirection div and place the content directly into @top-left margin box then that works OK, but obviously there are restrictions on how I can style that content, which is why I'm trying to use the extra div and named flows.
Is there any other way I can do this?
Thanks for your help.
Regards,
Gary.
I am using named flows to put HTML content into the margins. It works well but I have a few questions.
Here is the structure of my HTML and CSS:
@page {
@top-left {
content: flow(in_pdf_top_left);
}
@top-right {
content: flow(in_pdf_top_right);
}
}
h1 {
string-set: texth1 content();
}
.in_pdftext_h1 {
content: string(texth1);
}
.in_pdftext_pagenum {
content: counter(page);
}
#in_pdf_top_right {
flow: static(in_pdf_top_right);
}
#in_pdf_top_left {
flow: static(in_pdf_top_left);
}
...
<div id='in_pdf_top_left'><p>You are reading: <span class='in_pdftext_h1'></span> </p></div>
<div id='in_pdf_top_right'><p>Page: <span class='in_pdftext_pagenum'></span> </p></div>
...
Now, the page counter in the top-right margin box works a treat, but the string content update for the H1 header name only works if the in_pdf_top_left div appears AFTER the H1, and even then it is not updated after a new H1.
If I remove the indirection div and place the content directly into @top-left margin box then that works OK, but obviously there are restrictions on how I can style that content, which is why I'm trying to use the extra div and named flows.
Is there any other way I can do this?
Thanks for your help.
Regards,
Gary.