Hi. We have a web application which has a number of <select> elements whose <option> child elements have CSS 'style' attributes to change the background colo… (xem thêm)
Hi. We have a web application which has a number of <select> elements whose <option> child elements have CSS 'style' attributes to change the background color of some of the options, to make them stand out, like this simple test:
<option value="two" style="background-color: #00FF00;">TWO</option>
<option value="three" style="color: #FF0000;">THREE</option>
<option value="four" style="color: #FF0000; background-color: #00FF00;">FOUR</option>
This works with older version of Firefox but our users have discovered that the latest version, 49.0.1, ignores the styles for the <option> elements; in the example above all of the lines in the dropdown list for the <select> element have the same default background and color.
Older versions of Firefox show the different colors. Also Firefox 49.0.1 on Windows XP (must be the 32-bit version of Firefox) still does. But Firefox 49.0.1 for Windows Vista and Windows 7 does not show the colors.
Other browsers - Internet Explorer on XP, Google Chrome - also show the style colors.