views:

370

answers:

1

I have a div set to overflow: auto, max-width of 250px.

Inside the div I have a paging control, which allows users to pull back 10, 20, 50, or 100 results. If they pull back enough results, the inner content (table) will grow larger than the div and should then be scrollable.

This works fine in Firefox 3.5 and IE8, however in IE7, the scrollbar only shows after the first postback that requires a scrollbar (e.g. user selecting 20). If the user then selects another amount that requires the scrollbar (50, 100), the bar in IE7 will disappear.

If the user goes back to 10 results (no scroll needed), then proceeds to 20 results (scroll needed) the scrollbar will once again show up in IE7.

I can still scroll the inner content with my mousewheel, there is just no scrollbar.

Anyone know what the issue could be? I'm stumped... can provide details if needed.

Clarification: The scrollbar is disappearing even when the content is overflowing the Div.

A: 

Change the CSS property overflow from auto to scroll

See http://www.w3.org/TR/CSS2/visufx.html#propdef-overflow

Dancrumb
Yes, this is a last resort solution. The problem with this is the users will see an ugly greyed out scrollbar even when the inner content does not need to be scrolled.
David
So... what is it that you want them to see?You could just fake it, and pad the inner content so that it's always scrollable
Dancrumb
When there are 10 results (with 1 line entries), it should display no scrollbar (since it fits in Div).Anything over 10 results, or 10 result that are more than 1 line each, should be scrollable.I guess I could make the Div smaller than 10 entries, to make it always scrollable. But it seems odd to shape design around what appears to be a bug in IE7. :(
David
Apologies, after reading that comment, I realized that I'd misunderstood what was happening.It wasn't clear to me that the scrollbar was *disappearing* even though the content was overflowing the DIV.I'll delete this post; it might be worth clarifying your question in case others are as dense as me :)
Dancrumb