tags:

views:

172

answers:

2

Hi all,

in FF3 (3.0.14) I'm seeing an issue where the vertical scrollbar is hidden on an element if its height is less than 32px. In my (much simplified) example below, the scrollbar doesn't appear on "shouldScroll" - even though its child is larger than it - until I increase its height. Does anyone know if this is a known issue with particular versions of FF, and/or if any workarounds exist?

Cheers, Alasdair

P.S. sorry about the formatting, if someone could tell me how best to embed html in my post it'd be much appreciated

<html>
<head>
</head>
<body>
<div id="shouldScroll" style="height: 20px; overflow: auto; background-color: red">
<div id="child" class="popupText" style="width: 100px; height: 100px;">Run Test</div>
</div>
</body>
</html>
+1  A: 

I'm not a web developer but noticed 32 which is something of a magic number when dealing with images. The two buttons on the scrollbar are likely 16 pixels tall. I imagine Firefox is hiding the scroll bar when the client area size is less than the size of the two buttons.

Sorry, no idea about how to fix your actual problem.

Atoms
Yeah, it's hard to display a scroll bar if there isn't room for the buttons at the ends. Which begs the question: why the *heck* would you want a scrollable area 20px high??
Sixten Otto
Probably hard to explain out of context, but it's necessary. IE's solution is to make the scrollbar smaller by scaling down the size of the buttons, which is what we'd need ideally.
Alasdair Maclean
A: 

Known bug (https://bugzilla.mozilla.org/show_bug.cgi?id=292284, Atoms is right it's done when the scroll buttons don't fit), and I'm not aware of any workarounds.

Nickolay
Thanks for the link. Doesn't look like it's going to be fixed any time soon as it's not been looked at since 2006! :-)
Alasdair Maclean