javascript - Label Error in css -
i have form of textboxes validation.
it working fine if click save button first time showing correctly. once if fill text boxes , remove text text boxes error message getting displayed on text boxes. please see fiddle:
css:
#field { margin-left: .5em; float: right; } #field, label { float:left; font-family: arial, helvetica, sans-serif; font-size: small; } br { clear: both; } input { border: 1px solid black; margin-bottom: .5em; width: 72px; } input.error { border: 1px solid red; } label.error { position:fixed; background-image:url("../images/unchecked.jpg"); background-repeat:no-repeat; padding-left: 20px; margin-left: .3em; vertical-align:middle; background-color: #ffebe8; border: solid 1px red; width:210px; height:15px; } label.valid { position:absolute; background-image:url("../images/checked.gif") ; background-repeat:no-repeat; padding-left: 20px; margin-left: .3em; vertical-align:top; background-color:white; border:none; width:1px; height: 16px; }
do need float left #field , label?
#field, label { float:left; font-family: arial, helvetica, sans-serif; font-size: small; } if remove , remove position form label error , label valid:
http://jsfiddle.net/kimiliini/8sm7f/
also, want fix mobile number check. current:
/[789]\d{9}$/ would validate
// ok 7111111111 // validate ok: 123155551333321212121521251215421212487884655487111111111 try using:
/^[789]\d{9}$/ the ^ denotes start of string.
background-image bad. css property not have capital b.
Comments
Post a Comment