I have a contact us section of a page that I want to use display: none; by default but then display it when printing with @media print, but when I use display: block, even when more specifically addressing the elements and adding !important it doesn’t work. Here’s a code example:
In the example you’ve provided your display: block is only ever applying to the class .paragraph-text found within an element with the class of .contact-text.
You’re still leaving display: none valid at .contact-text level, which would override any visibility of nested elements, regardless of declarations like !important
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘CSS’ is closed to new topics and replies.