I would like to design HTML form with css and validation.
I want to have Textbox with colours indication. I have done with button to make it more meaningful. I would like to do same for the textbox.
I want to have light blue colour bydefault and when one clicks, it should be white and text should be black with dark blue border. In addition, if one enter wrong email, background-color of textbox should be light red, border (dare red) and should display message "Enter Valid Email".
// HTML CODE
Please enter your Email:
<br />
<input type="Email" class="input" name="Emailfield" size="35" required="required" />
<input name="Submit" type="submit" class="button" id="button" value="OK" />
// CSS CODE
body {
background: #ffffff;
}
input {
background-color: #4f81bd;
color: black;
font-family: arial, verdana, ms sans serif;
font-weight: bold;
font-size: 12pt
border: 12 px solid #385d8a;
}
.button {
font-family: Arial;
color: #ffffff;
font-size: 19px;
padding: 12px;
text-decoration: none;
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
border: solid #385D8A 4px;
background: #4F81BD;
}
.button:hover {
background: #ffffff;
color: #385D8A;
}