CSS/HTML: Create A Glowing Border Around An Input Field


Answer :

Here you go:



.glowing-border {
border: 2px solid #dadada;
border-radius: 7px;
}

.glowing-border:focus {
outline: none;
border-color: #9ecaed;
box-shadow: 0 0 10px #9ecaed;
}


Live demo: http://jsfiddle.net/simevidas/CXUpm/1/show/



(to view the code for the demo, remove "show/" from the URL)





label { 
display:block;
margin:20px;
width:420px;
overflow:auto;
font-family:sans-serif;
font-size:20px;
color:#444;
text-shadow:0 0 2px #ddd;
padding:20px 10px 10px 0;
}

input {
float:right;
width:200px;
border:2px solid #dadada;
border-radius:7px;
font-size:20px;
padding:5px;
margin-top:-10px;
}

input:focus {
outline:none;
border-color:#9ecaed;
box-shadow:0 0 10px #9ecaed;
}

<label> Aktuelles Passwort: <input type="password"> </label>
<label> Neues Passwort: <input type="password"> </label>





How about something like this... http://jsfiddle.net/UnsungHero97/Qwpq4/1207/



enter image description here



CSS



input {
border: 1px solid #4195fc; /* some kind of blue border */

/* other CSS styles */

/* round the corners */
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;


/* make it glow! */
-webkit-box-shadow: 0px 0px 4px #4195fc;
-moz-box-shadow: 0px 0px 4px #4195fc;
box-shadow: 0px 0px 4px #4195fc; /* some variation of blue for the shadow */

}


Use a normal blue border, a medium border-radius, and a blue box-shadow with position 0 0.



Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable