Scroll bar for Datalist in HTML5
Unfortunately, there's not much you can do with the datalist attribute. The datalist does not currently support any CSS styling, and specific visual characteristics are browser-specific. Some browsers may choose to add scrollbars for long lists.
If this isn't acceptable, you may have to forget the datalist and implement a ComboBox via Javascript. I believe JQuery has an autocomplete function that may be appropriate.
datalist vertical scroll not working in chrome
I have used ComboBox Javascript Component to fix this problem, from: https://www.zoonman.com/projects/combobox/
var no = new ComboBox('cb_identifier');
div.combobox { font-family: Tahoma; font-size: 12px}
div.combobox { position: relative; zoom: 1}
div.combobox div.dropdownlist { display: none; width: 200px; border: solid 1px #000; background-color: #fff; height: 200px; overflow: auto; position: absolute; top: 18px; left: 0px;}
div.combobox .dropdownlist a { display: block; text-decoration: none; color: #000; padding: 1px; height: 1em; cursor: default}
div.combobox .dropdownlist a.light { color: #fff; background-color: #007}
div.combobox .dropdownlist,input { font-family: Tahoma; font-size: 12px;}
div.combobox input { float: left; width: 182px; border: solid 1px #ccc; height: 15px}
div.combobox span { border: solid 1px #ccc; background: #eee; width: 16px; height: 17px; float: left; text-align: center; border-left: none; cursor: default}
<script type="text/javascript" charset="utf-8" src="https://www.zoonman.com/projects/combobox/combobox.js"></script>
<div class="combobox"> <input type="text" name="comboboxfieldname" id="cb_identifier">
<span>▼</span> <div class="dropdownlist"> <a>Item1</a> <a>Second Item2</a>
<a>Third Item3</a> </div></div>
Related Topics
How to Iterate Over Non-English File Names in PHP
PHP Fatal Error: Call to Undefined Function MySQLi_Stmt_Get_Result()
Set Session Variable Using JavaScript in PHP
Custom Order Status Background Button Color in Woocommerce 3.3 Admin Order List
How to Send Email from Localhost Using PHP on Linux
Swift Httppost Data Not Inserting to MySQL Database
How to Bind Multiple Parameters to MySQLi Query
How to Get Int Instead String from Form
Get Numbers from String with PHP
Differencebetween the PHP Open Tags "<=" and "<Php"/"<"
Mcrypt Rijndael-128 to Openssl Aes-128-Ecb Conversion
Retrieve JSON Post Data in Codeigniter
How to Write a Recursive Regex That Matches Nested Parentheses