28 Sep, 2006

Published at 07:22AM

Tagged with site, design, browsers, and css

This post has 2 comments

IE :hover support for non-links

It simply doesn’t exist. A highly desirable pseudo-class, and IE doesn’t support it. But it doesn’t deny it either. You see, when IE finds something it doesn’t support, it returns UNKNOWN. For instance, p:first-child in IE would return p:unknown, since IE doesn’t support :first-child. Naturally, you would expect it to do the same for :hover since it doesn’t support that, either. But it doesn’t. It recognizes the :hover, but doesn’t do anything with it unless it’s a link. Since IE does support behaviors, though, I believe you can use .htc or .hta files to attatch to specific elements through CSS, and change the behavior to whatever your little heart desires. But I’ve never done this and probably never will. I’ve yet to be in a situation where there was an extreme need for the :hover class.

Anyway, this spawns from my attempt (or lack thereof) to apply hovering effects to the Flickr images on my site. It took literally 1 minute to do in Firefox (img:hover). After all, it’s a fair and simple thing to want and based on what we know about CSS, a fair and simple thing to achieve. The intuition I’ve gained from writing CSS is acknowledged by the intuition of Firefox when reading CSS. IE is awkward, ugly, and annoying. Once it works in IE, FF tells me I’m wrong. So, there I am… hacking away in the stylesheet (refusing to use onmouseover for this) until I come back to Earth. Who cares if it doesn’t work in IE? I don’t use IE and those that do probably don’t pick up on how things like that add to a design, anyway. I’ve done it before, I just don’t have the perfect combination right now. I’m tired of having to hack for IE when the solution is so simple everywhere else. For now (and unless mandatory), I think I’ll surrender to IE by simply ignoring its crudeness.

Comments

Chris Thursday, 28 Sep, 2006 Posted at 11:00AM

You should check out IE7 (the Javascript library, not the browser) which adds a lot of CSS2 support to IE.

Ryan Thursday, 28 Sep, 2006 Posted at 12:14PM

I’ve never come across that. Thanks for the tip—it looks pretty handy.

Do you have something to say about this post?
Retype the image to the right Spam Hint: Are You Human? Textile Formatting Tips

or

Ryan Heath | Site Management A Ruby on Rails production.

This site is a Formed Function. Formed Function LLC | @formedfunction | Get in Touch