3

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.

0

1 Answer 1

5

Just make sure your rule is more specific than the default like so:

input[type="text"]#searchbox {
    width: 450px;
}
Sign up to request clarification or add additional context in comments.

1 Comment

@Blankman: Nope; that would look for a input[type="text"] descendant of #searchbox.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.