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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what is the opposite of {display:none;} 1

Status
Not open for further replies.

andycape

Programmer
Aug 22, 2003
177
ZA
If i dont want something to print i use :

<style media=&quot;print&quot;>
.noPrint {display:none;}
</style>

what would it be if i wanted it displayed only when printing ? something like {display:all;} ?? or &quot;yes&quot;

thanx
 
i have tried that but it is also visable when i view it, i only want it to be visable when i print (so if not printing you cannot see it).

thanx
 
In your regular stylesheet use {display:none;} and in your print stylesheet use {display:block;}. You might want to replace &quot;block&quot; with whatever is appropriate.

petey

News and views of some obscure guy
 
something like:

Code:
<style type=&quot;text/css&quot;
[red]
Code:
media=&quot;print&quot;
[/red]
Code:
>
.printOnly {display:block;}
.noPrint {display:none;}
</style>
<style type=&quot;text/css&quot;
[green]
Code:
media=&quot;screen&quot;
[/green]
Code:
>
.printOnly {display:none;}
.noPrint {display:block;}
</style>
<div class=&quot;printOnly&quot;>This will only appear in Print!</div>
<div class=&quot;noPrint&quot;>This appears on-screen. But not in print.</div>

Try different settings, (&quot;list-item&quot;, ferinstance) and see what you get.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top