This question already has an answer here:
- How to style a <select> dropdown with only CSS? 24 answers
In Css we can genrally style all elements but I noticed that we can not style option
element of a select using CSS. As far as I know Option is child element of select
then what is possible causes that it don't let you style this element?
I've had reffered various answers on stackoverflow stating that You just can't style option. but I want to know exact reason behind it.
I've had reffered this link which says that option tag is rendered by OS and not by html. If so then why we need to specify option
? why it don't automattically render options.
Here is another link which shows how to style Select tag. But i want to know that why we can't style option
? I don't want to know how to style select
tag using CSS.