| Change background color of a form input box |
|
|
|
| Written by Administrator | |
| Thursday, 29 May 2008 | |
|
This tutorial will show how to change the color of an input box or textarea when they are active. This is very simple and is done using CSS.
css code:
.input {
background-color: #656D78;
border: 1px solid #333333;
color: #cccccc;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
}
.input:focus { background-color: #3D4D64; border: 1px solid #333333; color: #cccccc; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; } .inputbutton{ background-color: #e5ffc3; border: 1px solid #333333; } .inputbutton:focus{ background-color: #3D4D64; border: 1px solid #333333; } html code:
<input type="text" name="input1" class="input">
<input type="text" name="input2" class="input"> <select name="sel" class="input" > <option name="test1">select1</option> <option name="test2">select2</option> </select> <input type="submit" value="submit" class="inputbutton"> |
|
| Last Updated ( Monday, 02 June 2008 ) |
Login Form |