Forum How do I...?

Question on display:none

princeuser
Hello,

We have divs that has display: none. The divs are being displayed (display:block) when the user clicks on a button.

In the Prince CSS we have defined the following.

*[display="none"] {
display: none;
}

However the div for e.g.
<div class="style-wrap" id="language_de" style="display: none;"> is still being output to the pdf.

Any advice?
mikeday
Check if you are using @media screen or @media print. The CSS doesn't quite make sense; the div doesn't even have an attribute called "display", so the selector won't match.
princeuser
Thank you for the fast response

We don't have @media screeen or @media print

Would this selector work?

*[style*="display: none"] {
display: none;
}
mikeday
I'm not sure why you would need it; if you have style="display: none" on an element, that should be sufficient, unless it is being overridden by another rule somewhere else.