Reputation: 2994
I have these two in my html code:
<input class="input1" type="text" size="15" name="login">
<input class="input1" type="submit" value="Send">
In CSS I have styles for .input1
and input.input1
:
.input1 {
//something
}
input.input1 {
//something
}
And now I would like change style only for buttons (type submit) and keeps style for inputs type text. How can I do that? I tried in CSS with submit.input1 {
and button.input1 {
but this is not working.
Upvotes: 2
Views: 1332
Reputation: 12672
You can specify attributes in selectors like so .input1[type="submit"]
Upvotes: 1
Reputation: 479
Try
input[type=submit] { /* your code here*/ }
or
input.inputbox[type=submit] { /* your code here*/ }
Upvotes: 5