Hello.
There is a simple SELECT element. It looks like this:

simple select

How to remove the icon on the right so that, for example, it looks like this:

Required select

PS :
This select must always remain select . Those. with the help of libraries and JS , in order not to redo it into, for example, <UL> <LI> ... ... ... and the like.
And without using libraries, if you need JS for styling.

    1 answer 1

    It's very easy to stylize a select without creating a monstrous html structure that mimics the behavior of an element. To do this, use a feature / bug with the transparency of the select tag, namely if you set the opacity: 0 to a village, then clicking on it will display options normally without transparency. Therefore, you need to make a div with the styles as you need, and on top of it you can apply a select with absolute positioning and zero transparency, it will work as an ordinary select without problems.

    But in order for the selected value to change in the diva depending on the selected value in the select, you need to write a simple script that reads and writes this value to the div onchange.

    PS Why so mock users?

    • one
      So in general: <div id = "container"> <input type = "text" name = "pseudoSelect" id = "pseudo-select" value = "1" /> <select id = "select" onchange = "pseudoSelect.value = this.value "> <option> 1 </ option> <option> 2 </ option> <option> 3 </ option> </ select> </ div> <style> #container {position: relative} #pseudo -select, # select {position: absolute; top: 0; left: 0} # pseudo-select {width: 30px} #select {z-index: 1; opacity: 0; width: 50px} </ style> - Crasher
    • Well, yes, just merge the css for #select into one and add document.getElementById ('pseudoSelect'). value and you do not need the value of the select but the text inside the options - makregistr
    • @makregistr, you're just great! This is even more than I need! I did not think that if select is invisible, it will still work as it should. Thanks you. And about the bullying, so there is absolutely no him. I needed to change the view of the select, but not to change the tag itself. - Anton Mukhin