Link to home
Start Free TrialLog in
Avatar of Mani Pazhana
Mani PazhanaFlag for United States of America

asked on

ASP.net dropdownlist horizontal scrollbar setting

Hello Expert,

can we set horizontal scroll bar for asp.net Dropdownlist control.

If yes, please let me know how we can do this.

Thanks
Mani
Avatar of raterus
raterus
Flag of United States of America image

Well..you could put it in a scrollable div, but I don't think you'd like the end result of that option (you'd have to scroll to drop it down)?  The usual dropdownlist has no support for a horizontal scrollbar, it would look too bulky if it had one.
     <div style="width:200px; overflow: scroll">
                  <asp:dropdownlist ... />
      </div>

--The best I can think of

Avatar of AerosSaga
AerosSaga

Forcing scrollbars
The techniques used to “fix” the bug in question, can also be used for other purposes. With CSS, you can forcefully show or hide both vertical and horisontal scrollbars in both Mozilla Firefox and Internet Explorer.
Forcefully enabling scrollbars:

html {
overflow: scroll;
}

Forcefully disabling scrollbars:

html {
overflow: hidden;
}

Hiding the horizontal scrollbar in IE:

html {
overflow-x: hidden;
}

Hiding the vertical scrollbar in IE:

html {
overflow-y: hidden;
}

Forcing the horizontal scrollbar in IE:

html {
overflow-x: scroll;
}

Forcing the vertical scrollbar in IE:

html {
overflow-y: scroll;
}

Forcing the horizontal scrollbar in Mozilla:

html {
overflow: <del>moz</del>scrollbars-horizontal;
}

Forcing the vertical scrollbar in Mozilla:

html {
overflow: <del>moz</del>scrollbars-vertical;
}

http://noscope.com/journal/2004/02/horizontal_scrollbar_bug

Aeros
Avatar of Mani Pazhana

ASKER

Sorry, It didnt help me out.

Thanks
did it apply the style?
I just want to set
horizontal scroll bar for asp.net Dropdownlist controlon my aspx page.

I dont want it for entire aspx page.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of raterus
raterus
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial