Re: printing a portion of a page

by Marten Gallagher <info(at)annerykiln.co.uk>

 Date:  Fri, 12 Mar 2004 10:04:21 +0000
 To:  "Write Words" <webwriting(at)hotmail.com>,
hwg-style(at)hwg.org
 References:  hotmail
  todo: View Thread, Original
> Hi,
> Is there a way to print a portion of a page. I have a long page: the top is
> a brief introduction, the bottom is an order  blank that people will want to
> print. I only want the order-blank portion to print when the user hits
> "print" and not the introduction portion of the page.

> Solution is CSS or JavaScript? Thanks in advance for help.....rosemary

Yes:

You need two style sheets one for media=screen and one for
media=print.

Add display=none to the selectors in the print style sheet where you
don't want them to print.

That's the short answer.

A specific ref:

http://www.devx.com/projectcool/Article/19918/0/page/2

or a Google ref to more:

http://www.google.co.uk/search?sourceid=mozclient&ie=utf-8&oe=utf-8&q=css+display%3Anone

Or this book which covers exactly the thing you want and lots more:

http://www.ericmeyeroncss.com/order.html


Marten Gallagher

-- 
Annery Kiln Web Design
Delivering Information Effectively
www.annerykiln.co.uk
Web Design and Site Management
Web Hosting and Print Design

HWG hwg-style mailing list archives, maintained by Webmasters @ IWA