I’m trying to make my form a bit more friendly for users by applying an error class to the elements that they had a problem with so I created a very simple coError class dictating a background color and am applying it to the elements in question. The issue I’m having is that it’s not applying the background color. The boxes are remaining standard color.
Here’s the page in question(with the elements already having the applied class):
Can you point at a specific element that you think should have the class applied? The ones I’ve looked at so far don’t show the class you mention, and I can’t see the corresponding CSS. How is the class being applied? JS?
I don’t see the class on the input elements, how are you trying to apply the class?
You can use the invalid pseudo class for this if you give the inputs the required attribute.
OK I see it now in View Source, I guess it does not show in Inspect because it’s invalid, you have the class attribute twice. It should only appear once, but can contain more than one class separated by a space.
If the issue is not solved, please update your test page and explain how the change of background-color is being applied, or not being applied again.
Good places to start troubleshooting HTML and CSS are the validators. Significant problems in the structure of the HTML can prevent the CSS and/or JavaScript from being applied as expected.