How to hide menus when printing?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
kassandrakat
Beginner
Beginner
Posts: 1
Joined: Mon Jul 21, 2003 6:29 pm

How to hide menus when printing?

Post by kassandrakat »

I've got a menu on an educational website and I'd like to have the menus disappear when a user tries to print a page. I've tried simple things like surrounding the menus with <div>s and then hiding them in the print stylesheet, but nothing seems to be working. Is there something I can add to the mmenu.js file?

Thanks,
Kat
:D
AndrewRoazen
Beginner
Beginner
Posts: 3
Joined: Fri Aug 29, 2003 7:20 pm
Location: Arizona
Contact:

How to hide Milonic from printouts

Post by AndrewRoazen »

I mentioned this on the mailing list but it bears repeating.

Create a file named hideprint.css and put the following line in it:

Code: Select all

#menu0 {display:none;}
Then, in your pages using the menu, add the following line into the <HEAD> section:

Code: Select all

<link href="hideprint.css" rel="stylesheet" media="print" type="text/css" />
Do not redo this stylesheet link using the <STYLE>@import url(filename.ext)</style> method. NN4 needs to use this stylesheet, otherwise an obscure bug in NN4 causes some pages with Milonic menus to print as blank pages.

Whoops, looks like Andy already covered this one:
http://milonic.com/forum/viewtopic.php?p=8383#8383
Post Reply