I am working on achieving a specific behavior.
When using a listBox (or comboBox), the first element (such as "choose one") should have a unique style.
Here is an example of code to test:
<style type="text/css">
.testX {font-style: italic;}
</style>
(...)
<select name="name" id="id">
<option class="testeX" selected="selected" value="#">
<p class="testX">Choose One</p>
</option>
<option value="TestValue">
TestValue
</option>
I can observe this behavior in Firefox, but not in Chrome. When I expand my listBox and select 'Choose One', the field does not display the italic style.
Is there a way to achieve this using only HTML and CSS, or do I need to utilize jQuery?
Thank you.