It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming CSS Forum

adding style for disabled fields.

adding style for disabled fields.

Postby dayv2005 on Fri Apr 06, 2007 1:41 pm

Ok i'm doing some forum validation for our company's website. I found some cross browser problem, i design in ie7 and firefox 2.x. I been testing all my javascript in firefox.

The problem is in firefox when a check box is clicked it disables some fields in form elements. Well in firefox when the fields are disabled they turn light gray. Now in Ie7 fields that are disabled stay the same color you are just unable to click in them.

So i wanted to add a style sheet for forms that are disabled.

i have style sheets for reg fields, req fields and fields that weren't filled in.

here's a sample of it

input {
margin: 0.1em;
}

input.invalid, textarea.invalid {
background-color:#FFFFCC;

}

input.invalid:focus, textarea.invalid:focus {
background-color:#FFFFCC;

}

input:focus, textarea:focus {
background-image: none;
border: 0.2em;
border-color: #7E9FDA;
border-style: solid;
margin: 0;
}
.boxes {
border: none;
}

.required {
background-image: url(images/required.gif);
background-position: right;
background-repeat: no-repeat;
}
dayv2005
 
Posts: 3
Joined: Fri Apr 06, 2007 1:35 pm

Postby dayv2005 on Fri Apr 06, 2007 3:26 pm

if it would help o could post the javascript.

bc i seen else where to add a disabled class and assign a disabled field that class. but it's being disabled in js and also classes are being applied too so im not sure hoe to go about doing that.
dayv2005
 
Posts: 3
Joined: Fri Apr 06, 2007 1:35 pm


Who is online

Users browsing this forum: No registered users and 1 guest