Reputation: 267020
I have a default style like this:
input[type="text"]
{ width: 250px; }
Now I have a input box that I want to have 450 width, how can I do this?
I've tried:
#searchbox
{
width: 450px;
}
<input type="text" value="" name="asb" id="searchbox">
but that didn't work.
Upvotes: 3
Views: 8228
Reputation: 25675
Just make sure your rule is more specific than the default like so:
input[type="text"]#searchbox {
width: 450px;
}
Upvotes: 5