[thelist] overflow: auto/scroll

aardvark roselli at earthlink.net
Fri Apr 19 22:09:01 CDT 2002


> From: ".jeff" <jeff at members.evolt.org>
>
> adrian,

that's aardvark to you, buddy-boy...

> > <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?
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
> because without a width, it obeys its primary function and that's to
> change its width to fit its contents.

<pre> is a block-level element, and therefore should expand to fit the
page/body/document/container... <table> is the only block level element that
contracts to its contents...

now, expanding is a different story... it isn't expanding to fit the content, the
content is expanding the *document* (container), and the <pre> is simply
filling the space, as it does as a block-level element...

this is documented stuff, but i'm going nuts trying to find it... i think it was a
link on css-d...

> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > 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...
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
> fwiw, try setting an overflow to anything other than visible on any
> other block level elements and see what happens.  it won't obey it
> unless you give the element an explicit height or width, depending on
> which direction you're setting the overflow and how wide or tall the
> content within the block level element is.

only because the block level element will expand/contract its height to fit the
content (so you'd have to restrict it with a height) and the content will expand
the document, and the block-level element will expand to fit...

i would prefer, however, that the container stop at the viewport width, failing
any other reason to expand the document itself, so that a width doesn't have
to be set...

it feels counter-intuitive to me...

you don't have to convince me why it does this, i understand it, and i
understood it before you explained it, but that's not my point...

> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > > 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...
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
> it's not the padding that does it by itself.  it's the setting of the
> overflow-x and overflow-y to different values *with* the padding.

except in IE5.5, it didn't work... it may have in IE6, but not in IE5.5...

> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > >     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 ;
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
> sorry, but i disagree that you can set overflow to auto for both x and
> y. i'll send ya a screencap of what i see in ie6 and nn6 if you don't
> believe me, but you gotta have overflow-y set to visible to avoid that
> annoying vertical scrollbar.  and, that bottom padding is necessary to
> give room for the horizontal scrollbar on the bottom of the block
> level element without overlapping the last line of content.  why it
> doesn't resize to accommodate that scrollbar is beyond me, especially
> when a height isn't set and vertical overflow is set to visible.

i don't have IE6 installed, but in N6, it performs as desired with just the one
overflow style... just a horizontal scrollbar, no vertical...

i know why the padding is there, and it works in N6... but using the overflow-
x/overflow-y created a vertical scrollbar in N6, so i gutted it and replaced it
with the general overflow...




More information about the thelist mailing list