Forum How do I...?

Hiding HTML elements from Prince with CSS?

jamespaden
I know elements can be easily hidden in print mode like this:

@media print {
#print-button { display: none; }
}


But many of our users want to use media screen queries, as that exactly matches the styling displayed in the browser. Is there any way to have CSS run only inside Prince, and be ignored by the browsers. Something like:

@prince {
#print-button {display: none; }
}


Thanks!

Try DocRaptor - PrinceXML web service and official PrinceXML partner

mikeday
Not at the moment, although you can apply a separate user style sheet to the document.