I've never really styled form elements before and just started adding styles to a form with a bunch of text fields and one submit button. I started out with something like this:
But this of course style my submit button, and I'm assuming it would also style any other inputs whether they were text fields or not. I found that you could (according to CSS standards) also specify an attribute selector to match attributes for an element:
This of course didn't work in IE (but does in Mozilla). So my question is, what is a better way to apply a style to just one type of form input. Assign all the inputs to a class? Assign the submit button to a class or id and override the input style I defined? I don't really like either of these options so I'm hoping there's a better way that is compatible in most browsers.
Kevin
A+, Network+, MCP
Code:
input{
background-color: gray;
border: 1px solid blue;
}
Code:
input[type=text]{...
This of course didn't work in IE (but does in Mozilla). So my question is, what is a better way to apply a style to just one type of form input. Assign all the inputs to a class? Assign the submit button to a class or id and override the input style I defined? I don't really like either of these options so I'm hoping there's a better way that is compatible in most browsers.
Kevin
A+, Network+, MCP