I’ve tried to implement this beyond the basic single field forms and can’t get it to work. I need to create a form with single fields and a text box too. How can I get the highlighting to work with a text box?
You’ll have to be a little bit more specific or post some code (or even better a link) for us to be able to help…
That post I wrote is basically just some jQuery that waits for focus events on form elements, then changes the class name of the parent element. Since the parent elements are always wrapping DIV’s, you can use that class name to do something like change a background color creating a nice effect of colorizing the whole area around the input and label.
Below is the code from your original demo melded into a real form I’m trying to adapt it to. Aside from the internal style sheet (at this stage), it uses your external style sheet too. It’s not on-line yet so here’s the code:
< !doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">