Hello,
Does anyone here know how I can change the highlight color of a selected item in a drop down menu using CSS?
Hello,
Does anyone here know how I can change the highlight color of a selected item in a drop down menu using CSS?
VirtueTech…
This is what you are looking for:
<style type=“text/css”>
<!–
option { color: #cc0000; background-color: #000000; }
.another { color: #00000; background-color: #33ff00; }
–>
</style>
The first example (OPTION) will apply to every instance of the OPTION tag, no further coding is needed.
If you wanted to apply a style to only one OPTION tag, then you would use the second example (.another) and do this:
<select>
<option>this is a test</option>
<option class=“another”>Another test</option>
<option>One last test</option>
<option>One last test</option>
<option>One last test</option>
<option>One last test</option>
</select>
Is that clear?
Yes but it does not change the color of the SELECTED option or the option the user has highlighted.
How do I change that?
ah…I don’t believe you can change that as that is a Windows API thing (I think).
I am pretty sure that you will have no luck there…
lol…juz to add some…
hey…( pardon me…trying to raise my post count…juz joking…ahah )
you could add other properties…like font family, size and more.