IE vertical scrollbar triggers a horizontal scrollbar

111 views
Skip to first unread message

r a f t

unread,
Mar 25, 2009, 12:07:36 AM3/25/09
to Google Web Toolkit
hello,

i have some content widget, which is placed into a pixel sized
ScrollPanel. the widget easily fits into ScrollPanel by its width. in
IE6 when widget's height is more than ScrollPanel, vertical scroll bar
appears, which in turn (i guess so) triggers horizontal scrollbar to
create space for vertical scrollbar. when widget is shorter by height
no scrollbar appears. i tried both setting width of widget to 100% and
remain it unset.

in firefox it works as expected (no horizontal scrollbar). i didn't
test it for other IE versions

any ideas how to fix this ? setting width of widget to 90% or some
pixel width may help (didnt try), but i prefer them as last choices as
they depend on scrollbar width.

thanks,
r a f t

Tony Strauss

unread,
Mar 25, 2009, 12:57:09 PM3/25/09
to Google Web Toolkit
We've had this issue too (in IE6 and IE7). Our solution was to set
the 'overflow' to 'hidden' in the ScrollPanel's CSS:

.designingpatterns-Table-Grid-ScrollPanel {
overflow-x: hidden !important;
overflow-y: auto !important;
}

The '!important' annotation is necessary.

Tony
--
Tony Strauss
Designing Patterns, LLC
http://www.designingpatterns.com
http://blogs.designingpatterns.com

r a f t

unread,
Mar 26, 2009, 1:48:29 PM3/26/09
to Google Web Toolkit
hi tony,

thank you. i had also found that solution programatically:
DOM.setStyleAttribute(scrollPanel.getElement(), "overflowX",
"hidden");

but there is catch: that way, vertical scrollbar steals from widgets
area. one needs to place proper padding to rightside.

On Mar 25, 6:57 pm, Tony Strauss <tony.stra...@designingpatterns.com>
wrote:
> We've had this issue too (in IE6 and IE7).  Our solution was to set
> the 'overflow' to 'hidden' in the ScrollPanel's CSS:
>
> .designingpatterns-Table-Grid-ScrollPanel {
>     overflow-x: hidden !important;
>     overflow-y: auto !important;
>
> }
>
> The '!important' annotation is necessary.
>
> Tony
> --
> Tony Strauss
> Designing Patterns, LLChttp://www.designingpatterns.comhttp://blogs.designingpatterns.com
Reply all
Reply to author
Forward
0 new messages