pengman
Junior Member
Posts: 4
Registered: 10/15/2008
Location: UK
Member Is Offline
|
| posted on 10/15/2008 at 03:41 PM |
|
|
How do I control the CSS class of labels BEFORE a form is validated?
I can control the text style I want after the submit button is clicked (in this case, blue for a correctly completed field, red for in incorrectly
completed or empty field), but I can't control them before the sumbit button is clicked (i.e. I only have my machine default style).
My CSS classes for validator are as follows:-
/* classes for validator */
.tfvHighlight {
font-family: Arial, Helvetica, Geneva, Sans-Serif;
font-size: 10pt;
font-weight: bold;
color: red;
}
.tfvNormal {
font-family: Arial, Helvetica, Geneva, Sans-Serif;
font-size: 10pt;
font-weight: bold;
color: navy;
}
My code for a typical form field is as follows:-
<td id="t_first_name" align="right" width="25%">First Name:
</td>
<td align="left" width="25%">
<input type="text" size="25" name="first_name">
</td>
The above code is similar to your Demo1, so I'm mystified as to where Demo1 is getting its pre-submit control of labels from.
|
|
|
pengman
Junior Member
Posts: 4
Registered: 10/15/2008
Location: UK
Member Is Offline
|
| posted on 10/17/2008 at 04:43 PM |
|
|
Sorted this myself. What i didn't have was a style for 'td'. Once I added that, all was well.
|
|
|
|