From: "Philipp Lenssen" <phil@mrinfo.de>
Newsgroups: comp.infosystems.www.authoring.html
Subject: Re: Can I hide a button when printing?
Date: Thu, 6 Dec 2001 11:23:43 +0100
Message-ID: <9unh7s$46m$1@swifty.westend.com>
Newsgroups: comp.infosystems.www.authoring.html
Subject: Re: Can I hide a button when printing?
Date: Thu, 6 Dec 2001 11:23:43 +0100
Message-ID: <9unh7s$46m$1@swifty.westend.com>
"Robert Louis Murphy" <robert@solsticeinc.net> wrote in message
news:gctP7.44$VV.4915217@news2.randori.com...
> If I have a button in one of my frames call "Print This Frame" can I keep
it
> from printing?
In the HTML, use:
<div class="printButton">
<!-- print button here, e.g.: -->
<input type="button" value="Print"
onclick="handlePrint()" />
</div>
In the CSS media "print":
.printButton
{
display: none;
}
> or do I have to have two versions of the page one for
> displaying that has a button and one for printing that doesn't have a
> button?
>..
Depends if you want the Win-Netscape 4x group to have a screen- and
print-optimized CSS. Most other browsers either ignore stylesheets, or
handle them -- and the media types -- more or less bugfree. Netscape 4 will
happily pull media "screen" CSS when printing, and destroy your good
intentions.
--
Philipp Lenssen
M+R Infosysteme
http://www.mrinfo.de
