Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Input default CSS

Tags:

html

css

http://jsfiddle.net/fj5u5Lk3/

<input type="text"></input>

On focus, this field gets a blue border, by default. Where can I find the default value and color code of it? I want to add my own, but it gets overwritten. I want to remove it, but then want to add it back on, and can't without knowing the default values.

like image 429
George Irimiciuc Avatar asked Sep 15 '25 14:09

George Irimiciuc


2 Answers

You can use input[type="text"]:focus:

input[type="text"]:focus {
    outline: none;
    box-shadow: 0px 0px 5px #61C5FA;
    border:1px solid #5AB0DB;
}
input[type="text"]:focus:hover {
    outline: none;
    box-shadow: 0px 0px 5px #61C5FA;
    border:1px solid #5AB0DB;
    border-radius:0;
}
<input type="text"></input>
like image 87
Alex Char Avatar answered Sep 18 '25 05:09

Alex Char


It's called outline property. You can set

outline: 0px;

to disable it. And, for example

p {
    outline-style: dotted;
    outline-color: #00ff00;
}

for some properties. You can read something here: http://www.w3schools.com/cssref/pr_outline-color.asp or just search "outline css property"

like image 20
lenden Avatar answered Sep 18 '25 04:09

lenden