Sameek Mishra
Sameek Mishra

Reputation: 9384

how to manage horizotal and vertical scrollbar in selectbox?

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 enter image description here

Thanks

Upvotes: 2

Views: 9131

Answers (2)

GajendraSinghParihar
GajendraSinghParihar

Reputation: 9131

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

Upvotes: 3

Tim Lamballais
Tim Lamballais

Reputation: 1054

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.

Upvotes: 0

Related Questions