File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Hide text in printout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Hide text in printout" Watch "Hide text in printout" New topic

Hide text in printout

cavin brown

Joined: Apr 18, 2006
Posts: 5
To hide certain text in the print out... I made the font color white and added a dark background behind the text, assuming that the white text wont turn out on the page. but the text still shows up on the print out.

Please advise how to make a text visible on the page but invisible on the printed page.

[ April 18, 2006: Message edited by: Bear Bibeault ]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Search google for CSS Print Media

and set the dtyle to disply none

cavin brown

Joined: Apr 18, 2006
Posts: 5
Thanks Eric... it worked.

I just had to make the text invisible in my '<LINK media=print' css.

I agree. Here's the link:
subject: Hide text in printout
It's not a secret anymore!