printing issue
printing issue
we are using a DHTML vertical menu in left column of our page; when we print the web page, the DHTML menu prints in the middle, on top of the web page content... is there a way to correct this? we would like the menu either to print from its spot on the page, or not print at all, or print from a different spot on the page where it wouldn't block HTML text...
i have tried playing with screen position and menu placement, but to no avail
any advice is appreciated...
i have tried playing with screen position and menu placement, but to no avail
any advice is appreciated...
If you want to have the menu NOT print, then create a style (either on the page or in a css file like I do here):
Then in your page, around where you include your scripts, put a div tag around them with the class set to noprint and it will hide the menu for print. See...
The browser should listen to the css, as mine did with IE 6. I use these noprint and printonly css styles to precisely control what gets shown and what gets printed. It makes my pages print a whole lot better! Good luck.
Code: Select all
<!-- Styles for turning off things for print -->
.noprint{
display: block; }
.printonly{
display: none; }
@media print{
.printonly{
display: block; }
.noprint{
display: none; }
}
Code: Select all
<div class="noprint">
<SCRIPT language=JavaScript src="/inc/menu/milonic_src.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="/menu_data.js" type=text/javascript></SCRIPT>
</div>
Dave Hergert
Software Engineer
"Helping to make the menu better, one
at a time."
Software Engineer
"Helping to make the menu better, one

Great bit detective work there Dave
Also, just to re-iterate printing and the menu. If you declare a style sheet of type media=print and then place this little snippet in the CSS file, it will do pretty much the same thing.
Cheers
Andy

Also, just to re-iterate printing and the menu. If you declare a style sheet of type media=print and then place this little snippet in the CSS file, it will do pretty much the same thing.
Code: Select all
.mmenu
{
position:absolute;
display:none;
}
Cheers
Andy
-
- Super Advanced
- Posts: 47
- Joined: Sun May 19, 2002 7:23 pm
- Location: Québec, QC, Canada
- Contact:
I have used Hergio's code to prevent my menu from being printed. What it does it to print the menu entries without the darker background. This is OK with me, but there is curiously a big backslash covering the entire height of the menu bar being printed at the very left. I am using an HP LaserJet 2200D. Is this a bug in the menu? This happens with both version 3.5 and version 5.
-
- Beginner
- Posts: 3
- Joined: Fri Aug 29, 2003 7:20 pm
- Location: Arizona
- Contact:
BTW, you want to use the LINK tag syntax for referring to your hidemenus.css to ensure NN4 respects it:
A funny bug in NN4 has resulted in our homepage being print rendered as a blank sheet (in NN4) unless this line is added.
Code: Select all
<link href="hidemenus.css" rel="stylesheet" media="print" type="text/css" />
-
- Beginner
- Posts: 3
- Joined: Fri Aug 29, 2003 7:20 pm
- Location: Arizona
- Contact:
Max by linking the way Andrew mentioned (with the media=print) it basically tells the page that when its about the be printed, use these styles instead of the regular ones. It allows you to have a page print differently then viewed on screen. If you prefer not to link your style sheets, and do them inline on the page (in the head) you specify which style properties to use when printing using my method described above.
Dave Hergert
Software Engineer
"Helping to make the menu better, one
at a time."
Software Engineer
"Helping to make the menu better, one

no both of our ways will change it for print...it just a matter of where do you want to specify the style. In an included file or defining in the page. My option used a div tag around the menu to hide it, thats before I knew that we could reference the .mmenu class and override it for print. But you can either include the style in a CSS or inline in the page.
Dave Hergert
Software Engineer
"Helping to make the menu better, one
at a time."
Software Engineer
"Helping to make the menu better, one

I.E. 6 sp 1 issue?
I've got the styles"
#menu0 {display: none;}
.mmenu {position:absolute; display:none; }
in a stylesheet (media = print).
In preview the menu is gone, but when the paper comes out the printer, the content in the place where the menu cascades out to is blank.
Using the same page in Mozilla 1.5/1.6 works FINE. Bug in I.E. 6? Anyone else having the same issue? Workaround?
thanks
./tc
#menu0 {display: none;}
.mmenu {position:absolute; display:none; }
in a stylesheet (media = print).
In preview the menu is gone, but when the paper comes out the printer, the content in the place where the menu cascades out to is blank.
Using the same page in Mozilla 1.5/1.6 works FINE. Bug in I.E. 6? Anyone else having the same issue? Workaround?
thanks
./tc
It's a little tough without seeing the actual code setup, but I think that should work.
What you're trying is close to the article at http://www.macromedia.com/devnet/mx/dre ... print.html. Maybe that will help.
What you're trying is close to the article at http://www.macromedia.com/devnet/mx/dre ... print.html. Maybe that will help.
John