Help with CSS

  • Thread starter Thread starter Steve Grosz
  • Start date Start date
S

Steve Grosz

Can anyone direct me to where I can find a CSS that will allow me to print a
page just as its displayed?

I'm trying to find something I can use to create a 'printer friendly' option
for some information that I'm hosting.

Thanks.
Steve
 
the general idea is to mark up your page with .css and then make a second
style sheet that gets used via the @media rule.
usually people want to leave stuff (like menus and images) out of the print
version.
you can go to http://nedp.net/newh/xmas and view the source. clip out the
urls for the two style sheets and paste them into the address bar so you can
download the style sheets.
also there is a very good tutorial at:
http://www.alistapart.com/articles/goingtoprint/

HTH
 
-----Original Message-----
Can anyone direct me to where I can find a CSS that will
allow me to print a page just as its displayed?

I'm trying to find something I can use to create
a 'printer friendly' option for some information that
I'm hosting.

This is pretty difficult, because the page width when
browsing and the page width when printing will usually be
different. Also, the Web visitor can disable printing of
certain elements, such as background colors and background
images.

You'll probably have more success designing a page that
prints the same as it displays.

To override certain styles when printing, add a second
style sheet coded media="print". Here's an example.

<style type="text/css" media="print">
.... print-specific css rules go here ...
</style>

If you prefer to use a single CSS file, code the print-
specific styles as follows:

@media print {
.... print-specific css rules go here ...
}

For more info on this technique, browse:
http://www.alistapart.com/articles/goingtoprint/

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Back
Top