I have many forms on my website, and, of course, many of the fields in them are required. If the required field remains empty, it is assigned the class "error", and I try to surround the field with red, regardless of whether it is a text field, a drop-down menu or a flag. I have the following code in my css file:
.error input, .error select, .error textarea { border-style: solid; border-color: #c00; border-width: 2px; }
Now, oddly enough, that works well in IE, but in Chrome the checkboxes are not circled in red, although I can see that CSS is applied to them when checking an element.
And this may not be relevant in the css code above, is active, but I have something else in my css file:
input[type=checkbox] { background:transparent; border:0; margin-top: 2px; }
And it is used so that the checkboxes display correctly in IE8 and less.
Any ideas on how I can render the red border in Chrome?
EDIT: Here's the jsfiddle: http://jsfiddle.net/PCD6f/3/
css checkbox google-chrome border
mmvsbg
source share