Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I want to hide a print label in this case there is a disclaimer at the bottom of the page and I want to hide the disclaimer text and the yes and no agree checkbox buttons. Only in print so when its print view it's hidden but when in form they have to check the box before they submit agreeing with the dislaimer

What I have tried:





No









all the stuff you don't want to print




Posted
Updated 19-Oct-17 16:22pm
v3

1 solution

Do something like this:

HTML:
HTML
<div class="noprint">
all the stuff you don't want to print
</div>

CSS:
CSS
@media print {.noprint {display:none}}

Check it out using your browser print preview.
 
Share this answer
 
Comments
Member 13474780 19-Oct-17 22:11pm    
So how do I set out all the stuff I don't want to print? I just want the Check box and the text not to show in print preview and roughly where abouts?
Peter_in_2780 19-Oct-17 23:37pm    
Leave your page as is, except for these two points:
1. Any parts you don't want to appear in print, surround with <div class="noprint"> ... </div>
2. Put the line of CSS somewhere in your existing CSS or in a style block in the head area.

If you need to apply this to inline elements, use "span" instead of "div"
Member 13474780 19-Oct-17 23:45pm    
I still can't get it.... And I cant post my code here to show you...
Member 13474780 19-Oct-17 23:46pm    
its still not working even when I do that and I cant link my code to show you guys

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900