gherkins
gherkins

Reputation: 14983

how to reset/restore/show the default border/appearance of an input element

How would you reset/restore/show the default border/appearance of a text <input> element
which has inherited some other border style, which you cannot access and change:

input[type="text"] {
   border: 2px dotted #eee;
}

Isn't there something like border: default; ?

Unfortunately neither border: initial nor border: medium none; seem to restore the default values.
At least not in chrome 35...

http://jsfiddle.net/e37bh/

Upvotes: 0

Views: 62

Answers (2)

gherkins
gherkins

Reputation: 14983

The only thing that seems to do the trick is...

border-style: inset;
border-color: initial;

see http://jsfiddle.net/e37bh/1/

Upvotes: 0

Jan-Luca
Jan-Luca

Reputation: 19

border: initial;

Displays the border with the browser default styling. I think it should do the trick for you.

Upvotes: 1

Related Questions