[thelist] overflow: auto/scroll

aardvark roselli at earthlink.net
Wed Apr 17 21:38:03 CDT 2002


> From: ".jeff" <jeff at members.evolt.org>
[...]
> > http://roselli.org/adrian/articles/breadcrumbs.asp
> >
> > only N6/win2k (so far) seems to render (correctly) the
> > larger <pre>s, [...]
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
> correctly.  not really.  nn6 is implying a width on the pre block that
> isn't specified.  imo, ie is doing the correct thing, not nn6.

<pre> is block level and should extend to the edge of the document, or the
edge of viewport... right?  why would it need a width?

> however, give this a shot. add a "width: 98%" to your pre declaration
> above and you'll see that (at least in ie6) it works like it does in
> nn6.  this didn't have any terribly adverse effects in nn6 in my test
> document.

yes, IE5.5 draws the scrollies...

using the 98%, IMO, isn't necessarily correct and feels like a hack... as a
block-level element, it should behave by extending to the edge of the page if
the page content is wider than the viewport, otherwise to the edge of the
viewport... the overflow should have taken care of its decision because the
content in the <pre> was the widest element on the page...

> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > that would otherwise go off the window, with
> > scrollbars... IE5.5 just makes the <pre>s go off
> > window,
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
> yup, it needs to be told where the boundary for the element is.

i still think that's not correct behavior...

> yeah, one of the things broken in opera's css support that really
> sucks. from my testing it doesn't appear to support overflow: auto in
> any fashion.

seemingly not... tried it every which way...

> odd.  i'm seeing the same behavior regardless of overflow set to auto
> or scroll.  when it's set to auto, <pre></pre> block doesn't resize to
> make room for the horizontal scrollbar causing the last line or so to
> appear underneath the scrollbar which in turn causes a vertical
> scrollbar.  quite annoying.
>
> playing with it a bit more, i set overflow-x to auto, overflow-y to
> visible, and gave the bottom 25px of padding (to accommodate for the
> scrollbar) and it works as expected in ie6 and nn6.  still no joy in
> opera 6.

the bottom padding has no effect in killing the up-down scrollie for me in
IE5.5...

> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > ultimately, i'm looking for a way to show blocks of code
> > without relying on <textarea>s, pop-up windows, or
> > blocks of text that munge the page forcing the user to
> > do the left-right-scroll-dance...
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
> aw, so just do the left-right-scroll-dance within <pre></pre> blocks
> instead eh?
>
> ;p

it's gonna happen somewhere, right?  why not on the page, in context, with a
height that at least adjusts?

so there.  punk.

>     overflow-x: auto;
>     overflow-y: visible;
>     padding-bottom: 25px;
>     width: 98%;

i got away with these three doing the job in N6 and IE5.5 (sorta) without
breaking O6... still gotta test da macs:

	overflow : auto ;
	width : 98% ;
	padding : 5px 5px 25px 5px ;




More information about the thelist mailing list