I have the following CSS for my print style:
* { display:none; } #printableArea { display:block; }
I expected this to hide all elements, and only show the printableArea, however everything gets hidden. In print view, all I get is a blank page.
I have it included properly in the HEAD, with media="print"
on this particular stylesheet.
To hide the element, add “display:none” to the element with CSS.
To hide an element, set the style display property to “none”. document.
The following style rule hides an element on a web page: display: none; When you set the value of display to none, the affected element will disappear. This means the element will no longer take up any space on the web page.
If an element is not displayed, then none of its children will be displayed (no matter what their display property is set to).
*
matches the <html>
element, so the entire document is hidden.
You need to be more selective about what you hide.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With