HighDots Forums  

css print problems

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss css print problems in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
middletree
 
Posts: n/a

Default css print problems - 11-11-2004 , 12:43 PM






I've put a static version of my page at http://www.middletree.net/print.htm

The real deal is an ASP-built Intranet app that you can't see.

My goal is to make this page take up close to 100% of the width when
displayed on screen. And to be reduced to 900px when printed (all users know
to print landscape). I used a print css page, shamelessly stolen from
www.ncubed.com (with his permission), to accomplish this. The width thing
works fine.

But I also need to make sure that the menu doesn't print. To see what I am
talking about, you don't even have to waste your paper; you can use Print
Preview to see that the words from the menu, as well as some little boxes,
show up during print.

The menus are javascript-built. I know many here don't like that, but I am
able to use them in an environment where all suers are on WinXP/IE6+. If I
had to build the site from scratch, I would be something different, but I'm
not able to spend the time to rebuild right now. So I guess I need helping
understanding why the menu items and boxes still show up in printing

Any help on this would be appreciated.



Reply With Quote
  #2  
Old   
Al Sparber- PVII
 
Posts: n/a

Default Re: css print problems - 11-11-2004 , 01:21 PM






You need to hide the menu parts. If they are being rendered from a
script file, your only option is to try to override whatever style is
being used - if any. If this doesn't work, then you've discovered
another disadvantage to those types of menus :-)

#menuselector {visibility: hidden !important; display: none !important;}

Of course, you will need to use the appropriate selector(s) that relate
to your menu.


BTW - 900px is a bad choice for print width. Use points or inches.

--
Al Sparber - PVII
http://www.projectseven.com
DW Extensions - Menu Systems - Tutorials - CSS FastPacks
---------------------------------------------------------
Webdev Newsgroup: news://forums.projectseven.com/pviiwebdev/
CSS Newsgroup: news://forums.projectseven.com/css/
RSS/XML Feeds: http://www.projectseven.com/xml/




"middletree" <middletree (AT) htomail (DOT) com> wrote

Quote:
I've put a static version of my page at
http://www.middletree.net/print.htm

The real deal is an ASP-built Intranet app that you can't see.

My goal is to make this page take up close to 100% of the width when
displayed on screen. And to be reduced to 900px when printed (all
users know
to print landscape). I used a print css page, shamelessly stolen from
www.ncubed.com (with his permission), to accomplish this. The width
thing
works fine.


Reply With Quote
  #3  
Old   
middletree
 
Posts: n/a

Default Re: css print problems - 11-11-2004 , 02:57 PM



Comments inline:


"Al Sparber- PVII" <adCUTmin (AT) projectCUTseven (DOT) com> wrote

Quote:
You need to hide the menu parts. If they are being rendered from a
script file, your only option is to try to override whatever style is
being used - if any.
I tried that, in my sheet called print.css, using code similar to what you
have below. I was hoping somebody would be able to see what I'm missing.
I've been poring through the code for quite a while now, but sometimes it
takes fresh eyes to see something glaringly obvious.

Quote:
If this doesn't work, then you've discovered another disadvantage to
those types of menus :-)

Problem is, I haven't seen anything, including PVII products, that will do
what I need this menu to do. I need it to use some ASP variables as part of
the menu code. In some cases, some menu items won't appear, and in others, I
have links on there which include querystring values, which are dynamic.

Having said that, I don't actually own PVII menu products yet. But I've read
enough about them to form this opinion. Feel free to correct me. And I
wasn't picking on PVII, but wanted to emphasize that I had to hack this
javascript code so much to make this work, I am not especially willing to go
through all that again with new menus.

Quote:
#menuselector {visibility: hidden !important; display: none !important;}

I've never heard of the important thing before. I'll have to look that up.


Quote:
BTW - 900px is a bad choice for print width. Use points or inches.
OK, I can do that. But why is px a bad thing?




Reply With Quote
  #4  
Old   
Al Sparber- PVII
 
Posts: n/a

Default Re: css print problems - 11-11-2004 , 03:02 PM



Quote:
"Al Sparber- PVII" <adCUTmin (AT) projectCUTseven (DOT) com> wrote in message
#menuselector {visibility: hidden !important; display: none
!important;}


I've never heard of the important thing before. I'll have to look that
up.
In essence, that is the answer to your question.



Reply With Quote
  #5  
Old   
middletree
 
Posts: n/a

Default Re: css print problems - 11-11-2004 , 03:21 PM



Which? The "!important", or the looking it up?


"Al Sparber- PVII" <adCUTmin (AT) projectCUTseven (DOT) com> wrote

Quote:
"Al Sparber- PVII" <adCUTmin (AT) projectCUTseven (DOT) com> wrote in message
#menuselector {visibility: hidden !important; display: none
!important;}


I've never heard of the important thing before. I'll have to look that
up.

In essence, that is the answer to your question.




Reply With Quote
  #6  
Old   
Al Sparber- PVII
 
Posts: n/a

Default Re: css print problems - 11-11-2004 , 03:22 PM



!important;

It will override what's being set in the script - hopefully.



"middletree" <middletree (AT) htomail (DOT) com> wrote

Quote:
Which? The "!important", or the looking it up?


"Al Sparber- PVII" <adCUTmin (AT) projectCUTseven (DOT) com> wrote in message
news:cn0gh8$71u$1 (AT) forums (DOT) macromedia.com...
"Al Sparber- PVII" <adCUTmin (AT) projectCUTseven (DOT) com> wrote in message
#menuselector {visibility: hidden !important; display: none
!important;}


I've never heard of the important thing before. I'll have to look
that
up.

In essence, that is the answer to your question.





Reply With Quote
  #7  
Old   
middletree
 
Posts: n/a

Default Re: css print problems - 11-11-2004 , 03:31 PM



Thanks. It isn't working. Dang!


"Al Sparber- PVII" <adCUTmin (AT) projectCUTseven (DOT) com> wrote

Quote:
!important;

It will override what's being set in the script - hopefully.




Reply With Quote
  #8  
Old   
Al Sparber- PVII
 
Posts: n/a

Default Re: css print problems - 11-11-2004 , 04:00 PM



Are you sure you have found the right selector(s)?





"middletree" <middletree (AT) htomail (DOT) com> wrote

Quote:
Thanks. It isn't working. Dang!


"Al Sparber- PVII" <adCUTmin (AT) projectCUTseven (DOT) com> wrote in message
news:cn0hmp$88l$1 (AT) forums (DOT) macromedia.com...
!important;

It will override what's being set in the script - hopefully.





Reply With Quote
  #9  
Old   
middletree
 
Posts: n/a

Default Re: css print problems - 11-11-2004 , 04:12 PM



No, I am not. It's kind of hard to tell. Heck, in that print.css, I put
everything in there that I could and set it to display:none !important;

Guess I'll keep digging, cause I agree with you that this is the problem. I
have to find all the selectors names used in that menu.

I put my latest stuff out there on the web at
http://www.middletree.net/print.htm


"Al Sparber- PVII" <adCUTmin (AT) projectCUTseven (DOT) com> wrote

Quote:
Are you sure you have found the right selector(s)?





"middletree" <middletree (AT) htomail (DOT) com> wrote in message
news:cn0i7l$8qp$1 (AT) forums (DOT) macromedia.com...
Thanks. It isn't working. Dang!


"Al Sparber- PVII" <adCUTmin (AT) projectCUTseven (DOT) com> wrote in message
news:cn0hmp$88l$1 (AT) forums (DOT) macromedia.com...
!important;

It will override what's being set in the script - hopefully.







Reply With Quote
  #10  
Old   
Al Sparber- PVII
 
Posts: n/a

Default Re: css print problems - 11-11-2004 , 04:52 PM



I'm afraid whoever wrote that script is not ID'ing the elements he is
creating. That's very bad form, but so long as you make sure you do not
use DIV tags anywhere else on the page, you can simply do this in your
print style sheet:

div {display: none;}

If you add DIVs of your own, each one will need to go in the print css
after the above rule, to counteract it, like this:

#myDiv {display: block !important;}

--
Al Sparber - PVII
http://www.projectseven.com
DW Extensions - Menu Systems - Tutorials - CSS FastPacks
---------------------------------------------------------
Webdev Newsgroup: news://forums.projectseven.com/pviiwebdev/
CSS Newsgroup: news://forums.projectseven.com/css/
RSS/XML Feeds: http://www.projectseven.com/xml/




"middletree" <middletree (AT) htomail (DOT) com> wrote

Quote:
No, I am not. It's kind of hard to tell. Heck, in that print.css, I
put
everything in there that I could and set it to display:none
!important;

Guess I'll keep digging, cause I agree with you that this is the
problem. I
have to find all the selectors names used in that menu.

I put my latest stuff out there on the web at
http://www.middletree.net/print.htm


"Al Sparber- PVII" <adCUTmin (AT) projectCUTseven (DOT) com> wrote in message
news:cn0jt1$aa4$1 (AT) forums (DOT) macromedia.com...
Are you sure you have found the right selector(s)?





"middletree" <middletree (AT) htomail (DOT) com> wrote in message
news:cn0i7l$8qp$1 (AT) forums (DOT) macromedia.com...
Thanks. It isn't working. Dang!


"Al Sparber- PVII" <adCUTmin (AT) projectCUTseven (DOT) com> wrote in message
news:cn0hmp$88l$1 (AT) forums (DOT) macromedia.com...
!important;

It will override what's being set in the script - hopefully.








Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.