Answering another question, I came across this strange mistake. A quick search did not find an existing question, so:
<select>
<option>Item1</option>
<option>Item2</option>
<option>Item3</option>
<option class="hidden">Item4</option>
<option class="hidden">Item5</option>
</select>
CSS
.hidden {
display: none;
}
Q: Why is it Item5always displayed, even if it is styled as hidden? Item4not displayed. Note. I am testing this in the latest version of Chrome.
Update:
Different people get different results in different browsers. The following (from the answer below) works in Chrome, but not in the latest IE (both Item4 and Item5 are shown):
.hidden {
visibility: hidden;
}
, ( ): <option> <select> CSS?, , . !