hiding menu when printing

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
akabook
Beginner
Beginner
Posts: 3
Joined: Tue Oct 23, 2007 2:07 pm

hiding menu when printing

Post by akabook »

Hi
I'm having trouble hiding menu when printing pages.
Tried this in IE7 and FireFox 2.0.0.8
Using DHTML Menu Version 5.785

I have tried to include in the page header

Code: Select all

<style type="text/css">
@media print { 
  .mmenu { 
      position:absolute;
      display: none; 
    } 
  } 
</style>
I have downloaded samples from your site and
changed only <head> tag in Index.htm to add this printing style

It does not help. Menu is present on paper.

I have gone so far that i added
onbeforeprint="closeallMenus()"

without success I must say :(

Can you help me regarding this issue?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: hiding menu when printing

Post by Ruth »

Hi,

That is what is posted for hiding the menu while printing. I did a search and someone else who had the issue said they solved it by adding the important tag

display: none !important

If this is a treemenu then with regards to the printing, treemenus have their class names changed so you need to add this to your CSS:

.treeBranch { DISPLAY: none; POSITION: absolute; }

Let me know if that fixes the issue. If not I'll have to post to Milonic for a solution

Ruth
akabook
Beginner
Beginner
Posts: 3
Joined: Tue Oct 23, 2007 2:07 pm

Re: hiding menu when printing

Post by akabook »

Ruth wrote:
Let me know if that fixes the issue. If not I'll have to post to Milonic for a solution
Tried that as well.
Can not remove menu from print.

source is downloaded from milonic samples as file "menu_sample46_ver5_785.zip" (Office 2003 menu style)
I have attached the modified index.htm and resulting print through adobe acrobat.

Can you check if I have made something wrong here.

akabook
Attachments
index.zip
modified index.htm and printed.pdf
(133.55 KiB) Downloaded 296 times
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: hiding menu when printing

Post by Ruth »

Hi,

I will report this to Milonic. I'm unable to test it since I don't have a printer.

Ruth
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: hiding menu when printing

Post by Ruth »

One more thing. Have you tried the newest version 5.786 is now out. I don't know that this will fix it.

Ruth
akabook
Beginner
Beginner
Posts: 3
Joined: Tue Oct 23, 2007 2:07 pm

Re: hiding menu when printing

Post by akabook »

tried V5.576

No success :(

I have inserted a button into original sample page with class="mmenu" along with print style of course.
Button is not visible in printpreview but the menu is.
So style is set OK.

PS: To try it without printer you can install dummy printer and use browser's print preview

akabook
Post Reply