[geeks] html (css) trick for (not) printing?

Joost van de Griek jvdg at sparcpark.net
Fri May 30 09:40:47 CDT 2008


On 30/05/2008, Francois Dion <francois.dion at gmail.com> wrote:

> Is there a way to have an element on a web page visible, but when you
> print the page it wont be on the printout? I have a workaround, but it
> has always seemed a bad way of doing this. I was wondering if maybe
> there's a css property I could set that would do the trick, but
> haven't found any.

Yes. You can assign media types (print, screen) to style sheets, so
specify the visibility for the element differently in each style
sheet.

Of course, plenty of browser will foul this up, but that would
theoretically be the correct way to go about it.

.tsooJ



More information about the geeks mailing list