I am working on one of core component of HTML, select
.
Now I want to modify its drop down behavior. Mean dropdown height, scroll sytle etc.
Is there any way to override the default behavior of dropdown?
Thanks
I am working on one of core component of HTML, select
.
Now I want to modify its drop down behavior. Mean dropdown height, scroll sytle etc.
Is there any way to override the default behavior of dropdown?
Thanks
You can override select
and option
styles, for example:
select {
background-color: yellow;
}
option {
background-color: violet;
}
<select>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
<option>Option 4</option>
<option>Option 5</option>
</select>
"I want to override the css for scroll bar, dropdown container height etc.". It seems like there is no way to do it in default HTML select
element.