HighDots Forums  

hiding a frame when printing

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss hiding a frame when printing in the Cascading Style Sheets forum.



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

Default hiding a frame when printing - 10-28-2004 , 03:17 PM







Hey all,

First off, frames - eww. I know. It's an internal site, so please don't tell
me to ditch the frames. We like them for what they're being used for.

That said, my users like to print just one frame, but it's a little bit
irritating to have to remember to choose "print only selected frame" in the
print dialog boxes. I've been messing with CSS media to try to not print the
menu frame. It's not going as well as I'd hoped. Can anyone help?

Here's what I have:
In the left frame, which should not print:
@media print {
body {
display: none;
}
}

In the frameset:
@media print {
#leftFrame {
display: none;
}
}

Problem: In IE, there is still a large left-side blank where the frame
content would be if it were shown. I want it collapsed so there is only the
typical page margin.
In Firefox/Netscape/Mozilla, there is the the large blank, plus it is
surrounded by a black outline.
What gives? Why can't I just tell it not to print the frame?

(I also tried setting the widths of the body, the frame, etc, to 0; no
good...)

--
--
~kaeli~
Cthulhu saves our souls and redeems them for valuable
coupons later.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace


Reply With Quote
  #2  
Old   
Pierre Goiffon
 
Posts: n/a

Default Re: hiding a frame when printing - 10-29-2004 , 09:12 AM






"kaeli" <tiny_one (AT) NOSPAM (DOT) comcast.net> a écrit dans le message de
news:MPG.1beb01d6a103605198a23d (AT) nntp (DOT) lucent.com
Quote:
First off, frames - eww. I know. It's an internal site, so please
don't tell me to ditch the frames. We like them for what they're
being used for.

That said, my users like to print just one frame, but it's a little
bit irritating to have to remember to choose "print only selected
frame" in the print dialog boxes.
Add a "print this page" button, that opens a new window without any frame.
Then the user can print this one.



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

Default Re: hiding a frame when printing - 11-01-2004 , 08:19 AM



In article <418241d3$0$15312$636a15ce (AT) news (DOT) free.fr>, pgoiffon (AT) nowhere (DOT) invalid
enlightened us with...
Quote:
"kaeli" <tiny_one (AT) NOSPAM (DOT) comcast.net> a écrit dans le message de
news:MPG.1beb01d6a103605198a23d (AT) nntp (DOT) lucent.com
First off, frames - eww. I know. It's an internal site, so please
don't tell me to ditch the frames. We like them for what they're
being used for.

That said, my users like to print just one frame, but it's a little
bit irritating to have to remember to choose "print only selected
frame" in the print dialog boxes.

Add a "print this page" button, that opens a new window without any frame..
Then the user can print this one.


This is a last resort solution unless you know of a way to get the page
without asking for it again from the server. The pages they like to print are
often the results of large queries and reports, so it would hurt my server a
bit to have to ask for the page twice.
Also, it requires a popup window (new window), so it's one more window they
have to then close. Not the optimal solution.

Thanks, though.

I have come close to a solution here, actually, but when I do
document.framename.print, it brings up the printer dialog box instead of the
print preview box, so when it gets printed, it cuts off parts of the page if
the page is too wide. They normally choose print preview then configure it to
print so it fits on one page.

I have a feeling there is no nice, tidy solution for this.

--
--
~kaeli~
He's your God, they're your rules - you burn in Hell.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace



Reply With Quote
  #4  
Old   
Neal
 
Posts: n/a

Default Re: hiding a frame when printing - 11-01-2004 , 09:42 AM



kaeli wrote:
Quote:
pgoiffon (AT) nowhere (DOT) invalid wrote:
That said, my users like to print just one frame, but it's a little
bit irritating to have to remember to choose "print only selected
frame" in the print dialog boxes.
Add a "print this page" button, that opens a new window without any
frame.
Then the user can print this one.
This is a last resort solution
Indeed, but by imposing frames you are forcing last resorts.


Reply With Quote
  #5  
Old   
Pierre Goiffon
 
Posts: n/a

Default Re: hiding a frame when printing - 11-02-2004 , 05:00 AM



"kaeli" <tiny_one (AT) NOSPAM (DOT) comcast.net> a écrit dans le message de
news:MPG.1beff3d6ea904cea98a24a (AT) nntp (DOT) lucent.com
Quote:
Add a "print this page" button, that opens a new window without any
frame. Then the user can print this one.

This is a last resort solution unless you know of a way to get the
page without asking for it again from the server.
Just send the correct cache http headers with the page, and it should be OK.
You can read the RFC 2616 chapter 13 for more information.



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.