Forum Bugs

@page serial Problem with invisible elements?

jimbrooking
Running Prince 8.0 Beta 1.

CSS1:
@page serial {
@top-left { content: string(headtext, first) }
@top-right { content: string(headtext, last) }
}

CSS2:
.streetx {
display: none;
string-set: headtext content();
}

Example of use:
<div class='streetx'>Phase I - Benchmark</div>

When rendered into PDF, the @top-left and @top-right areas on every page contain only the first invocation of the streetx class, as shown: "Phase I - Benchmark" (without the quotation marks).

If I comment out the "display: none;" line, the streetx content is correctly displayed on every page.

Have I missed something in the documentation, or might this be a bug?

Thanks,
Jim
mikeday
There is a known issue where "display: none" elements (in a block context?) can cause string-set to be ignored. Generally the workaround is to hide the element another way, eg. by absolutely positioning it and specifying "visibility: hidden", or other devious tricks.
jimbrooking
Thanks for the quick reply and the workaround.
jim_albright
font-size: 0

works.

Jim Albright
Wycliffe Bible Translators

jimbrooking
Clever! I'd got it to work with font-size: 1px; but I like 0 better! :)