I have used this for changing other aspects of the style, but for some reason it won't change the input field colour.... Is it possible to change it this way something like style.background-color: "red"; ? Other questions seem to make the space where my error message is, highlighted, rather than the actual text box its self.
JS
if (document.getElementById("telno").value == /^\d+$/ ) {
document.getElementById("errtelno1").style.display = "inline";
document.getElementById("errtelno1").style.visibility = "visible";
This is the CSS at the moment
.error{
display: none;
color: #FF2121;
font-family: arial;
font-size: 14px;
font-weight: bold;
}
h1{
font-style: normal;
font-weight: bold;
font-size: 20px;
font-family: Lucida Sans Unicode;
color: #0A032F;
text-align: center;
text-decoration: underline;
}
h2{
font-weight: bold;
font-size: 18px;
font-family: arial;
color: #33257B;
text-align: center;
text-decoration: underline;
}
p{
font-family: arial;
font-size: 14px;
}
fieldset{
margin-left: 400px;
margin-right: 400px;
margin-top: 40px;
text-align: center;
border: 1px solid #000000;
background: linear-gradient(#ffffff, #f2f2f2);
}
label{
font-family: arial;
font-size: 14px;
display: inline;
}
.formfield{
margin-left: 25px;
display: inline;
}
#title{
margin-left: 25px;
display: inline;
}