TheJoshMan
12-07-2008, 12:53 AM
Hey, I've been working on a pretty big form and it's easy to get lost in all the different form fields...
So i've grouped them in fieldsets and used css to reduce the opacity...
I was wondering, does the <fieldset> element not support the "onfocus" and "onblur" events?
I've tried using onfocus to make it opaque again, but it's not working.
I can use css to make it opaque when you hover over a fieldset, but i can't get it to stay opaque once you click on one.
Here's the code I'm using...
HTML:
<fieldset onfocus="this.className=this.className.replace('trans','opaque');" onblur="this.className=this.className.replace('opaque','trans');" >
<label for="hHead">home-heading-1 <span>(first word must be wrapped with <span class="orange"> </span></span></label><br />
<input name="hHead" type="text" class="small" value='<span class="orange">custom</span> fabrication'>
<input type="submit" value="submit heading changes" class="small-button"/>
</fieldset>
CSS:
.trans {
opacity: 0.4;
filter: alpha(opacity=40);
}
.opaque {
opacity: 1;
filter: alpha(opacity=100);
}
So i've grouped them in fieldsets and used css to reduce the opacity...
I was wondering, does the <fieldset> element not support the "onfocus" and "onblur" events?
I've tried using onfocus to make it opaque again, but it's not working.
I can use css to make it opaque when you hover over a fieldset, but i can't get it to stay opaque once you click on one.
Here's the code I'm using...
HTML:
<fieldset onfocus="this.className=this.className.replace('trans','opaque');" onblur="this.className=this.className.replace('opaque','trans');" >
<label for="hHead">home-heading-1 <span>(first word must be wrapped with <span class="orange"> </span></span></label><br />
<input name="hHead" type="text" class="small" value='<span class="orange">custom</span> fabrication'>
<input type="submit" value="submit heading changes" class="small-button"/>
</fieldset>
CSS:
.trans {
opacity: 0.4;
filter: alpha(opacity=40);
}
.opaque {
opacity: 1;
filter: alpha(opacity=100);
}