W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2005

[whatwg] [html5] window.print() undefined

From: Olav Junker Kjær <olav@olav.dk>
Date: Mon, 18 Jul 2005 22:31:13 +0200
Message-ID: <42DC1191.4040301@olav.dk>
Dean Edwards wrote:
> If I set element.style.display = "block" how do I hide it using a style 
> sheet when it is printed?

I dont think you should set element.style.display to "block", if the 
element should be visible only on screen and not in print. It would be 
better to dynamically assign it a class which is defined in the 
stylesheet to be visible on screen and not in print. (Its a bit tricky 
to add and remove class names, but still cleaner than using print events.)

regards
Olav
Received on Monday, 18 July 2005 13:31:13 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:41 UTC