Forum How do I...?

How can I specify a media print query for PrinceXML only?

mhund
On webbrowsers, we use header/footer with
@media print
{
header { display: table-header-group; }
main { display: table-row-group; }
footer { display: table-footer-group; }
}

The same document converted with PrinceXML need something like
@media print
{
header { flow: static(header); }
footer { flow: static(footer); }
}

Is it possible to specify a special PrinceXML media query to get both function in the same *.css?
markbrown
Prince also supports tests for media features, so one of them might be appropriate. For example, the following should work if scripting is enabled in the browser:
@media (scripting: enabled) {
    /* styling for browser */
}
@media not (scripting: enabled) {
    /* styling for Prince */
}

See here for the features you can test for.