Sr. Web Developer
mediabistro.com
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume

Comments for: fletcher20040402

Message # 1020991:
Date: 07/10/04 19:05
By: Big Mac Attack
Subject: Come on...too much work when you can use CSS


Define a class called "noprint" and put it on all <div>, <table>, etc. that you don't want to print.

Create a printer style sheet called printer.css and link as normal

<link rel="stylesheet" href="printer.css" media="print">

Then in printer.css use a simple rule like

.noprint {display: none;}

That pretty much does it, of course credit if you care about making it work in super old browsers. Then you can do a program to strip things, but this one seems too complicated anyway.

Previous Message | Next Message


Comments:
RE: Interesting, but too complex IMHOScott08/16/04 19:54
CSS is the apropriate solution!Fernando Wendt08/13/04 12:51
RE: using variablesmt07/29/04 03:32
Come on...too much work when you can use CSSBig Mac Attack07/10/04 19:05
using variableBIGmrC06/03/04 07:49
Printer version? CSS!Chris Erik Haugli04/16/04 02:40
RE: Interesting, but too complex IMHOJim Fletcher04/14/04 18:59
Interesting, but too complex IMHOTom04/09/04 09:45
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.