Horizontal Scrollbar Not Working On Select Tag September 29, 2022 Post a Comment I am trying to set the horizontal scrollbars on a select tag which is not working. Here's the code: style="overflow-x:scroll; width:120px; overflow: -moz-scrollbars-horizontal;"> <select id='mySelect' name="mySelect" size="5"> <option value="1">one two three four five six</option> <option value="2">seven eight</option> <option value="3">nine ten</option> <option value="1">one two three four five six</option> <option value="2">seven eight</option> <option value="3">nine ten</option> <option value="1">one two three four five six</option> <option value="2">seven eight</option> <option value="3">nine ten</option> <option value="1">one two three four five six</option> <option value="2">seven eight</option> <option value="3">nine ten</option> </select> <div id="divv" style='font-size: 1px'> </div> </div> <script> $('#divv').css('width', $('#mySelect').outerWidth()); $('#mySelect').css('width', $('#test').outerWidth()); $( "#test" ).scroll(function() { $('#mySelect').css('width', $(this).outerWidth() + $(this).scrollLeft()); }); </script> Copy Share Post a Comment for "Horizontal Scrollbar Not Working On Select Tag"
Post a Comment for "Horizontal Scrollbar Not Working On Select Tag"