This didn't work for me either. The only thing this did was allow me to
remove a few items from the incorrect print out I'm getting (only a portion
of the <div> area. The <div> area is quite large and scrolls for a while.
I would guess if the entire <div> area is printed it would be 4 pages -
instead I'm only getting one page).
I may be noteworthy (didn't think of this before) ... but this page is
inside a frameset ... basically a navigation bar is at the top and the
bottom 90% of the screen is for this form).
BBB
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
BBB wrote on 03 jun 2004 in comp.lang.javascript:
I have a web form with a <div> section ... I have it setup so the
Update/Cancel buttons are fixed at the bottom of the screen while the
content of the form is in the <div> and scrolls. Nice to the end user
... but when they go to print ... of course they only get a portion of
the entire web site. I've searched and found references to CSS type
solutions but have been unable to get them to work.
<div id="main" style="overflow:auto;">
web form
</div>
<style type="type/css" media="print">
div.print { display: block }
</style>
What I'm looking for is a way to have all of the content in the div
area to print.
It would ideally be [mind the "text/css"]:
<style type="text/css" media="print">
body {display:none;}
#main {display:block;}
</style>
But no, it does not work, so:
=========================================
<style type="text/css" media="print">
.noprint {display:none;}
</style>
<body>
<div class=noprint>
top
</div>
<div id="main" style="overflow:auto;">
web form
</div>
<div class=noprint>
bottom
</div>
</body>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)