Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Lock font size during printing of web page

0 views
Skip to first unread message

Allan Horwitz

unread,
Nov 8, 2000, 3:00:00 AM11/8/00
to

Is there a way to lock the font size of a web page during printing from IE 5
and 5.5 overriding any client side text size settings.

Allan

Rowland Shaw

unread,
Nov 8, 2000, 3:00:00 AM11/8/00
to

@media print
{
pre { font-size: 7pt ! important; }
}

"Allan Horwitz" <allanh...@hotmail.com> wrote in message
news:eXi$n9XSAHA.201@cppssbbsa03...

Allan Horwitz

unread,
Nov 8, 2000, 3:00:00 AM11/8/00
to
Rowland,

Thanks for your help.

I am fairly new to CSS and I can't seem to get the font control to work.

Here is my style block:

@media screen
{
.printonly { display: none; }


}
@media print
{
pre { font-size: 7pt ! important; }

.screenonly { display: none; }
}

Do I need to put a div tag around the text?
Is the syntak okay?

Allan

"Rowland Shaw" <spamf...@anotherpointless.org> wrote in message
news:#8jflcYSAHA.72@cppssbbsa03...

Allan Horwitz

unread,
Nov 8, 2000, 3:00:00 AM11/8/00
to

Never mind. I got it!


"Allan Horwitz" <allanh...@hotmail.com> wrote in message

news:#LpLtpYSAHA.272@cppssbbsa04...

Rowland Shaw

unread,
Nov 8, 2000, 3:00:00 AM11/8/00
to

My example changed all <pre>s to be 7pt when printed, you could create a
class like:
.fixedprint { font-size: 72pt ! important; }
and then use it, a la:

<div class="fixedprint">This will always print out at 72pt</div>

0 new messages