0

I want to add the placeholder in select list(ie. Something appear by default in select list until user select some option). To do this with the actual select list, I figure out the way, I add the placeholder at 0th index and set display:none for that option.

This works fine on Chrome and Firefox.

Please check this JSFIDDLE for demo.

But, this does not work on IE.

Is there any way to hide it on IE? Or is there any other way to add the placeholder to select list?

For more clarity, please check this Screenshot: http://screencast.com/t/5Bw95AYNCL

Aman Jain
  • 655
  • 5
  • 17
  • have you tried this? `` – Rolly Dec 29 '15 at 16:43
  • Works fine for me in IE 11 and Edge. – Chris G Dec 29 '15 at 16:46
  • @roll Your way will make the option with text 1 selected by default. This will not make Select as the placeholder. – Aman Jain Dec 29 '15 at 17:27
  • @ChrisG It is not working for me. Could you please verify once again? I want that the Select must appear when list is Closed and the option must not appear when list is expended. This is working fine on Chrome and Firefox. Please compare behavior on IE with Chrome/Firefox. – Aman Jain Dec 29 '15 at 17:31
  • I do think it works correctly, but the difference is that in chrome/ff the original selectbox keeps it's border on the bottom. And that disappears in ie. – Chris G Dec 29 '15 at 18:52

0 Answers0