Drop down with vertical scroll bar

Posted by Shivanichhabra4u under ASP.NET on 8/6/2010 | Views : 6250 | Status : [Member] | Replies : 1
I have requirement
There is one drop down in ASP.NEt 2.0..
If there are more than 10 entries in drop down,then have to display scroll bar..if less than 10 then no scroll abr normal dropdown hav to display
Note : Javascript can not be use


Posted by: Lalji_mer on: 10/26/2010 [Member] Bronze | Points: 25

follow this steps
1. Remove the width of the dropdown so that it will grow automatic

2. If it is in a table cell or something which doesnot allow it to grow then put it in a div like below

<div style="overflow-x:scroll; width:500px;

overflow: -moz-scrollbars-horizontal;">


Shivanichhabra4u, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response