Wilson
Wilson

Reputation: 8778

Adding a :focus border to a text input, and getting rid of the default one

In css, I want to have a 2 pixel light blue border when a given textbox is in focus. I have the following:

form input.text:focus
{
border:2px solid #09F;
}

Pretty simple. The problem is, the default orange border can still be seen outside of my new blue one. How can I get rid of this?

Upvotes: 1

Views: 597

Answers (1)

Paulo R.
Paulo R.

Reputation: 15619

I'm not sure it pertains to the outline property as it's usually blue, not orange (which browser are you on?). Anyway, try simply adding outline: none; to that ruleset.

Upvotes: 3

Related Questions