Pengman2
Junior Member
Posts: 4
Registered: 9/29/2009
Location: UK
Member Is Offline
|
| posted on 9/29/2009 at 04:11 PM |
|
|
Field Label Highlighting - CSS problem
In this example I'm not using an HTML table and, instead of highlighting the contents of a table's table data cell (the usual way to highlight field
labels?), am attempting to highlight field labels as follows.
<label id="t_email"><span class="tfvHighlight">*</span>Email Address:</label>
The following in the page head doesn't work (apart from providing the red asterisk - see above)
<style>
/* classes for validator */
.tfvHighlight
{color: red;}
.tfvNormal
{color: black;}
</style>
I figure this is because the page display is controlled by a complex CSS sheet that includes the following for labels in forms (I've done checks and
I know for sure this is the CSS that is currently controlling the labels where they occur in forms):-
form.contactform label, form.loginform label {
position:relative;
clear: left;
display: block;
float: left;
width: 180px;
text-align: right;
padding-right: 10px;
color: #000;
margin-bottom: 0.5em;
font-weight: bold;
}
So I've amended this as follows:-
form.contactform.tfvHighlight label, form.loginform.tfvHighlight label {
position:relative;
clear: left;
display: block;
float: left;
width: 180px;
text-align: right;
padding-right: 10px;
color: red;
margin-bottom: 0.5em;
font-weight: bold;
}
form.contactform.tfvNormal label, form.loginform.Normal label {
position:relative;
clear: left;
display: block;
float: left;
width: 180px;
text-align: right;
padding-right: 10px;
color: black;
margin-bottom: 0.5em;
font-weight: bold;
}
Still no joy. Tiagra's documentation says "Tigra Form Validator highlights labels of fields if ones have been filled with errors by just changing
CSS classes to be applied to those labels" which doesn't make much sense to me. Any suggestions anyone?
|
|
|
Pengman2
Junior Member
Posts: 4
Registered: 9/29/2009
Location: UK
Member Is Offline
|
| posted on 10/6/2009 at 06:49 AM |
|
|
support@softcomplex helped with this one (many thanks, SoftComplex!). The syle I needed was...
form.contactform label.tfvHighlight, form.loginform label.tfvHighlight {
etc:etc;
}
Works fine now, but obviously I need to brush up on my CSS.
|
|
|