[thelist] overflow: auto/scroll

Peter-Paul Koch gassinaumasis at hotmail.com
Tue Apr 16 01:20:00 CDT 2002



>sent this over to CSS-D on thursday, but despite all the well-intentioned
>help telling me things i knew, i got no insight into whether this is a
>recognized issue in any browsers, or any workarounds (clean or
>otherwise)...

I've never seen this before, but then I never tried it either.

>using the following CSS:
>pre	{	font-family : Courier, "Courier New", fixed-width, monospace ;
>		font-size : 80% ;
>		line-height : 140% ;
>		clear : both ;
>		overflow : auto ;
>		padding : 5px ; }
>
>on this page (and others):
>http://roselli.org/adrian/articles/breadcrumbs.asp

>IE5.5 just makes the <pre>s go off window, O6 stops the <pre> borders at
>the window edge, but
>the text keeps going (as if it were overflow:visible;)...

In 5.5 adding width: 100% to the style helped. In your design it should
probably be somewhat less.

I've seen a problem like this before but I haven't yet properly studied it,
this is just an elaborate guess based on your problem:

1) IE just throws in the PRE's with the extra-long lines and (apparently)
stretches the PRE's up, thus also stretching up the body width. So
scrollbars aren't necessary: the text fits into the PRE (though PRE and body
become too large).

2) NN, apparently, says that the body is as wide as the browser window,
hence the PRE is, too, and applies the scrollbars.

IE thus takes a maximalist approach to the width and height of the body, NN
a minimalist. IEMac is minimalist, too, as far as I remember (can't test it
right now).

>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...

Adding width to the PRE styles should solve the problem, you now give all
browsers specific, strict instructions that should result in scrollbars
where necessary.

ppk

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx




More information about the thelist mailing list