javascript - how to manage horizotal and vertical scrollbar in selectbox? - Stack Overflow

I want to add horizontal scroll bar in select box.i have tried with div section with following code sam

I want to add horizontal scroll bar in select box.i have tried with div section with following code sample,but

 <div id="topicsInterest_id" style="width:180px;height:280px;overflow-y:hidden;overflow-x:scroll;">

            <select id="topicsinterest" name="topicsinterest" multiple="multiple" style="width:400px;height:270px;" class="inputtxtbox">
             <option> ...</option>
            </select>
 </div> 

but client said that scroll box on the topic list etc the vertical scroller..is out of sight? It should be in view on the right side..

please help how to manage vertical scroll with horizontal scroll bar in select box,something like this

Thanks

I want to add horizontal scroll bar in select box.i have tried with div section with following code sample,but

 <div id="topicsInterest_id" style="width:180px;height:280px;overflow-y:hidden;overflow-x:scroll;">

            <select id="topicsinterest" name="topicsinterest" multiple="multiple" style="width:400px;height:270px;" class="inputtxtbox">
             <option> ...</option>
            </select>
 </div> 

but client said that scroll box on the topic list etc the vertical scroller..is out of sight? It should be in view on the right side..

please help how to manage vertical scroll with horizontal scroll bar in select box,something like this

Thanks

Share Improve this question edited Oct 1, 2012 at 8:31 Sameek Mishra asked Oct 1, 2012 at 8:15 Sameek MishraSameek Mishra 9,40431 gold badges94 silver badges118 bronze badges 4
  • Have you tried to add overflow-y: scroll; overflow-x: hidden; to <select>? However, I'd remend you to post some pictures of how you need to make the layout. – VisioN Commented Oct 1, 2012 at 8:23
  • I tried with but it doesn't work with me. – Sameek Mishra Commented Oct 1, 2012 at 8:27
  • "how to manage vertical scroll with horizontal scroll bar in select box" this sentence doesn't make sense to me. You want to get rid of scrollbars in select and just rely on scrollbars of div? Is that what you need? – WTK Commented Oct 1, 2012 at 8:32
  • I want to rely on scroll bars of div ,but problem is select box,also have vertical scroll-bar,if i used div vertical scroll bar then no sense to use select vertical scroll,if u suggest how to remove select scroll bar then my problem will solve. – Sameek Mishra Commented Oct 1, 2012 at 8:42
Add a ment  | 

2 Answers 2

Reset to default 3

see this demo

You just need to remove overflow-y:hidden;overflow-x:scroll; and set it to

overflow:auto;   // show Scroll when Required`  

OR

overflow:scroll;  //if you want to show scroll always

You have set overflow-y: hidden;, which specifies exactly the displayed behaviour (don't show vertical scrollbar).

If you set overflow-y: scroll; it will be visible.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745275075a4619989.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信