".invalid .value" styling overlap ".pc-focus .value" styling

david_dupont73's picture
Project:formsPlayer
Version:1.5.4
Component:User interface
Category:bug
Priority:critical
Assigned:Unassigned
Status:closed
Description

I use xf:select1 and xf:input componment in my formular which are binding on required="true" attribut.
I have a specific styling (pink color) on this invalid componment.

.invalid .value
{
background-color:#FF9999; /*#DDDDFF;*/
}

Moreover, I use pc-focus styling to identify the current field which has the focus.

.pc-focus .value
{
background-color:#316AC5;
}

When the current field is a required field, the required styling overlap the pc-focus styling.
It's very boring for the user because this one thinks to have loose the focus.

Updates

#1 submitted by Paul Butcher on Tue, 2007-10-09 15:20
Status:new» invalid

This is the nature of CSS, where conflicting styles are applied to an element, one of them has to win. In order to ensure that the one you want is the victor, you can
a) place its rule later in the stylesheet;
b) make the selector more specific;
or
c) use the !important declaration.

see Cascading order

#2 submitted by david_dupont73 on Thu, 2007-10-11 12:47
Status:invalid» closed

OK.
Thanks.