I need to change background color of required inputs in a form.
Following code doesn't work:
CSS
input[type="text"] .required { background-color: yellow; }
Open in new window
or CSS:
input .required { background-color: yellow; }
Open in new window
HTML:
<input class="required" type="text" id="email" name="email">
Open in new window
Tested in browsers FF 17.0.1 and IE 9 with latest patches.
Only HTML 4 and CSS 3 is acceptable.