Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hiding text 1

Status
Not open for further replies.

gocubbies

Programmer
Jul 11, 2001
3
US
dear whomever,

is it possible to format text in HTML so that it appears on the webpage, but when the page is printed, the text does not get printed?

thanks, joe
 
If you are using IE 5 or higher, you can use the onbeforeprint and onafterprint to make text disappear for printing purposes. Other than that I don't know... Thanks
John

johnmc@mvmills.com
 
yeah, & here is how 2 do it usin dfrnt media types:
[for IE5 (mozilla?):]

set up 2 style sheets:

<style media=&quot;screen&quot;>

#divtoprint {display:block}
#dontprint {display:block}

</style>

<style media=&quot;print&quot;>

#divtoprint {display:block}
#dontprint {display:none}

</style>
play around
regards, vic
 
vic,
exactly what i was looking for, thank you.

joe
 
I use something very similar to that to hide the print button on a page before it is printed. Very convenient. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top