[pmwiki-users] Srolling boxes
Patrick R. Michaud
pmichaud at pobox.com
Wed Jun 7 18:00:28 CDT 2006
On Thu, Jun 08, 2006 at 10:10:34AM +1200, John Rankin wrote:
> On Wednesday, 7 June 2006 6:02 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > -- All of the IE scrollbars for "overflow=auto" hide the last line of
> > preformatted text; that is, one has to scroll vertically in order to
> > see the last line.
>
> What happens if you add a padding-bottom which *should* go between the
> text and the scroll bar?
The padding allows the display box to grow big enough to see the
last line, but a vertical scrollbar still exists (presumably to be
able to scroll to see the padding that is underneath the horizontal
scrollbar).
Surprisingly, a bottom-padding of at least 1 pixel causes the
horizontal scrollbar to suddenly appear in Firefox
as it is supposed to.
So, that leaves us with the following,
pre { overflow:auto; padding-bottom:1px; }
which causes most browsers to put a scrollbar on the text
only when it's larger than the available space, and we
handle IE's quirks with the following in the template:
<!--[if IE]>
<style type='text/css' media='screen'>
pre { width:800px; padding-bottom:1.33em; }
<style>
<![endif]-->
Pm
More information about the pmwiki-users
mailing list