docmombo
12-22-2005, 08:32 PM
Is there a way to have a sentence appear on your page, but when you print the page out, the sentence does not appear?
Example:
I want the page to have a link that says:
"Return to regular version"
I don't want that to appear on printouts.
Any ideas?
Thanks
Doc
Masterslave
12-22-2005, 08:37 PM
You can add this in the head of your HTML docuemnt:
<link rel="stylesheet" href="css/print.css" type="text/css" media="print" />
Then wrap a span tag around the sentence like this:
<span class="noprint">Return to regular version</span>
In the print.css you enter this line
.noprint
{
display: none;
}
This worked for me. :thumbsup:
docmombo
12-22-2005, 08:54 PM
This made the printing invisible on the screen. I want it invisible when it prints the page, but visible on the screen.
Thanks for your help.
Doc
Masterslave
12-22-2005, 09:12 PM
This line:
<link rel="stylesheet" href="css/print.css" type="text/css" media="print" />
media="print" will say that the CSS is working when you are printing.
Did you have add media="print" in the line of your link tag?
So, when you browse to the page you've to see your sentence, when you printing, it's not visible.
docmombo
12-23-2005, 02:35 PM
It's like you were reading the code on the computerr...I did forget the media=print statement. My fault.
The code did work.
Thank you so much.
Doc
Masterslave
12-23-2005, 02:48 PM
Hehe, most people don't see the media thing, I thought by myself, o he's forget to add the media.:p
I'm happy that it's working.:D