Reputation: 8020
I have input type button (in a form) in a div, i tried changing the css of the input but it has no effect.
<input type=button value="Search" id="search">
css:
input[type=submit] {
color: #000000;
background-color: #FFFFFF;
font-size: 16px;
}
Upvotes: 0
Views: 181
Reputation: 141
in your css do:
input[type='button'] {
color: #000000;
background-color: #FFFFFF;
font-size: 16px;
}
also try putting the button for the type param in quotes:
<input type='button' value="Search" id="search">
Upvotes: 0
Reputation: 213
Use semicolons in your css:
input[type="submit"] {
color: #000000;
background-color: #FFFFFF;
font-size: 16px;
}
Or
input[type="button"] {
color: #000000;
background-color: #FFFFFF;
font-size: 16px;
}
Upvotes: 0
Reputation: 1235
You've set the id so just refence that:
#search {
color: #000000;
background-color: #FFFFFF;
font-size: 16px;
}
Upvotes: 0
Reputation: 1662
Your input type is button
(without quotation marks). It should be submit
. Also you CSS-selector should be with quotation marks.
input[type="submit"] { ... }
<input type="submit" value="Search" id="search">
Upvotes: 0
Reputation: 14348
You have given button instead of submit Fiddle
input[type=submit] {
color: green;
background-color: #FFFFFF;
font-size: 16px;
}
<input type="submit" value="Search" id="search">
Upvotes: 0
Reputation: 56429
Your markup specifies [type=button]
, yet your CSS references [type=submit]
.
Change your HTML:
<input type="submit" value="Search" id="search">
Upvotes: 2