<$BlogRSDUrl$>

Internal Server Error

what the voices in my head tell me to write

Wednesday, May 06, 2009

the wierdest IE7 bug I have ever seen 

Sadly I dont have a demo of this available right now... will see what I can do.

I had a simple task in work today a whole bunch of checkboxes and their labels on the screen. Clicking on some of the checkboxes causes others to be disabled thanks to some nifty javascript. Nice and simple.

However I was asked to find a way to make the disabled elements look "more disabled" as it can be hard to spot the greyed checkbox on the dark background of the site.

As the checkbox was immediately followed by its label I quickly came up with:

input[disabled=disabled] + label { color: grey }

To quickly change the labels of disabled boxes only using CSS. Works great in Firefox. Clicked on a checkbox in IE7 (dont have to worry about IE6 - Hurray) and nothing happens... Then I move the mouse and magically the labels change colour!

I spent quite some time playing with it and that is definitely what is happening.You can see the checkboxes become disabled but the labels don't change colour until you move the mouse. I have googled for ages and can't find anything on it at all. Might try a static test page rather than the rather complex html js and css that there is there now.

I guess that I could fake a mouse event to fire off after the checkboxes get disabled but its easier to change the labels style at the same time as the disabling in the first place.

Why for the love of all things nice and fluffy why?

Permanent link and Comments posted by Rob Cornelius @ Wednesday, May 06, 2009

Comments: Post a Comment


Links to this post:

Create a Link

links to this post
    follow me on Twitter

    My recent photos

    Archives

    Creative Commons License
    This work is licensed under a Creative Commons License.

    RSS feeds and things

    Feed Button Help

    This page is powered by Blogger. Isn't yours?

    contact the author

    rob cornelius can be contacted by email use his name with an dot and googles web based email domain