I have the following problem: I have an form with a few inputs. At the end of the form I have a submit and a reset button, which are inputs. I have a style in my CSS file for inputs (white background), but I want to write another style for inputs which are buttons (type=submit and type=reset).
I have tried to make a style named .button, and adding it to the input ( <input class=button) but the properties from the input style are used, not the properties from the .button style.
Any help would be appreciated.
Just take a look on attribute selectors from CSS2.1 specification:
[attribute-name=value]– this selector will match every element withattribute-nameset onvaluevalue. So all you need isinput[type=submit], input[type=reset]selector.