CSS overflow:auto prevents printing

36 views
Skip to first unread message

Jason Grout

unread,
Sep 1, 2009, 7:22:07 PM9/1/09
to sage-...@googlegroups.com
I was trying to print a long worksheet in Firefox 3.5 and Opera 10.0 on
Ubuntu 9.04, and I was only getting a page or two before everything cut
off. I then changed the div.worksheet CSS style by deleting the
overflow:auto;. Then printing worked great (i.e., I could print out the
20-page worksheet). Does anyone know why we need the overflow:auto in
the div.worksheet CSS class?

I think it might have been so that a horizontal scrollbar was added for
very long output. Of course, this is the wrong place for it if this is
the reason (I might have been the one to make this huge mistake!)---the
overflow:auto should be on the output cell div, not on the entire
worksheet div, so that the scrollbar appears on the cell with the long
output.

Thanks,

Jason

--
Jason Grout

William Stein

unread,
Sep 1, 2009, 8:42:57 PM9/1/09
to sage-...@googlegroups.com
On Tue, Sep 1, 2009 at 4:22 PM, Jason Grout <jason...@creativetrax.com> wrote:

I was trying to print a long worksheet in Firefox 3.5 and Opera 10.0 on
Ubuntu 9.04, and I was only getting a page or two before everything cut
off.  I then changed the div.worksheet CSS style by deleting the
overflow:auto;.  Then printing worked great (i.e., I could print out the
20-page worksheet).  Does anyone know why we need the overflow:auto in
the div.worksheet CSS class?


Just to confirm, are you clicking on the big "Print" button in the middle top of the screen before printing?

William
 
I think it might have been so that a horizontal scrollbar was added for
very long output.  Of course, this is the wrong place for it if this is
the reason (I might have been the one to make this huge mistake!)---the
overflow:auto should be on the output cell div, not on the entire
worksheet div, so that the scrollbar appears on the cell with the long
output.

Thanks,

Jason

--
Jason Grout






--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

Jason Grout

unread,
Sep 1, 2009, 9:40:38 PM9/1/09
to sage-...@googlegroups.com
William Stein wrote:
>
>
> On Tue, Sep 1, 2009 at 4:22 PM, Jason Grout <jason...@creativetrax.com
> <mailto:jason...@creativetrax.com>> wrote:
>
>
> I was trying to print a long worksheet in Firefox 3.5 and Opera 10.0 on
> Ubuntu 9.04, and I was only getting a page or two before everything cut
> off. I then changed the div.worksheet CSS style by deleting the
> overflow:auto;. Then printing worked great (i.e., I could print out the
> 20-page worksheet). Does anyone know why we need the overflow:auto in
> the div.worksheet CSS class?
>
>
> Just to confirm, are you clicking on the big "Print" button in the
> middle top of the screen before printing?
>

Um, no, of course not! :).

Just like any new user, I'm hitting either control-p or selecting the
file menu and hitting print. The Print option for me is hidden inside
of the file drop-down---you can't see it unless you explore the
dropdowns. I looked for a button, couldn't find one, so I hit print
from the browser file menu.

It's pretty easy to specify a print css sheet using CSS "media"
constructs. The browser then automatically uses this CSS when printing,
but uses your normal CSS when displaying. A user shouldn't have to hit
a special Sage print button to print.

Yeah, I know, "Implement it and send a patch" :). Well, if someone gets
to it before me, here are a few references:

See http://www.yourhtmlsource.com/stylesheets/cssmediatypes.html or for
the spec, see http://www.w3.org/TR/CSS2/media.html. See also
http://www.javascriptkit.com/dhtmltutors/cssmedia.shtml or
http://webdesign.about.com/cs/css/a/aa042103a.htm for further
suggestions/tips.

The issue with the overflow should still be fixed, even for display.
It's been bothering me for a while that a long output produces a
scrollbar way down at the bottom of the worksheet, instead of a
scrollbar right on the output cell.

Jason

--
Jason Grout

William Stein

unread,
Sep 1, 2009, 10:01:00 PM9/1/09
to sage-devel


2009/9/1 Jason Grout <jason...@creativetrax.com>


William Stein wrote:
>
>
> On Tue, Sep 1, 2009 at 4:22 PM, Jason Grout <jason...@creativetrax.com
> <mailto:jason...@creativetrax.com>> wrote:
>
>
>     I was trying to print a long worksheet in Firefox 3.5 and Opera 10.0 on
>     Ubuntu 9.04, and I was only getting a page or two before everything cut
>     off.  I then changed the div.worksheet CSS style by deleting the
>     overflow:auto;.  Then printing worked great (i.e., I could print out the
>     20-page worksheet).  Does anyone know why we need the overflow:auto in
>     the div.worksheet CSS class?
>
>
> Just to confirm, are you clicking on the big "Print" button in the
> middle top of the screen before printing?
>

Um, no, of course not! :).

:-)
 

Just like any new user, I'm hitting either control-p or selecting the
file menu and hitting print.  The Print option for me is hidden inside
of the file drop-down---you can't see it unless you explore the
dropdowns.  I looked for a button, couldn't find one, so I hit print
from the browser file menu.

Just out of curiosity, do you see the button now?  It's just to the left of the "Worksheet" button.     
 
It's pretty easy to specify a print css sheet using CSS "media"
constructs.  The browser then automatically uses this CSS when printing,
but uses your normal CSS when displaying.  A user shouldn't have to hit
a special Sage print button to print.

Yeah, I know, "Implement it and send a patch" :).  Well, if someone gets
to it before me, here are a few references:

Implement it and post a patch ;-)

 -- William
 

See http://www.yourhtmlsource.com/stylesheets/cssmediatypes.html or for
the spec, see http://www.w3.org/TR/CSS2/media.html.  See also
http://www.javascriptkit.com/dhtmltutors/cssmedia.shtml or
http://webdesign.about.com/cs/css/a/aa042103a.htm for further
suggestions/tips.

The issue with the overflow should still be fixed, even for display.
It's been bothering me for a while that a long output produces a
scrollbar way down at the bottom of the worksheet, instead of a
scrollbar right on the output cell.

Jason



--
Jason Grout



Jason Grout

unread,
Sep 1, 2009, 10:07:49 PM9/1/09
to sage-...@googlegroups.com
William Stein wrote:
>
>
> 2009/9/1 Jason Grout <jason...@creativetrax.com
> <mailto:jason...@creativetrax.com>>
>
>
> William Stein wrote:
> >
> >
> > On Tue, Sep 1, 2009 at 4:22 PM, Jason Grout
> <jason...@creativetrax.com <mailto:jason...@creativetrax.com>
> > <mailto:jason...@creativetrax.com

> <mailto:jason...@creativetrax.com>>> wrote:
> >
> >
> > I was trying to print a long worksheet in Firefox 3.5 and
> Opera 10.0 on
> > Ubuntu 9.04, and I was only getting a page or two before
> everything cut
> > off. I then changed the div.worksheet CSS style by deleting the
> > overflow:auto;. Then printing worked great (i.e., I could
> print out the
> > 20-page worksheet). Does anyone know why we need the
> overflow:auto in
> > the div.worksheet CSS class?
> >
> >
> > Just to confirm, are you clicking on the big "Print" button in the
> > middle top of the screen before printing?
> >
>
> Um, no, of course not! :).
>
>
> :-)
>
>
>
> Just like any new user, I'm hitting either control-p or selecting the
> file menu and hitting print. The Print option for me is hidden inside
> of the file drop-down---you can't see it unless you explore the
> dropdowns. I looked for a button, couldn't find one, so I hit print
> from the browser file menu.
>
>
> Just out of curiosity, do you see the button now? It's just to the left
> of the "Worksheet" button.
>


Okay, I finally (!) found it. It's a smallish link; when you said
button, I kept looking for something like the Worksheet button.

It says something that I missed it two or three times when I was looking
for it. It probably says more about me than about Sage... :)

Jason


--
Jason Grout

William Stein

unread,
Sep 2, 2009, 10:07:01 AM9/2/09
to sage-devel


2009/9/1 Jason Grout <jason...@creativetrax.com>

Putting it there wasn't a result of any thought on my part.  It's just an exact copy (literally) of what Google Docs did 2 years ago (same icon in the same place).   At the time, I wanted to make the Sage notebook just like Google Docs so some people would immediately think it feels more familiar.  If you look at Google Docs now you'll see that they moved/changed it.

 -- William
Reply all
Reply to author
Forward
0 new messages