IE forms and whatever:hover (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


Tailslide -> IE forms and whatever:hover (4/5/2006 18:56:47)

Does anyone have any reason to suspect that there's something nasty lurking if I use whatever:hover to achieve hover effects on a form in IE as per FF etc? It seems to work on IE6, IE5 - but it somehow seems too easy...




rdouglass -> RE: IE forms and whatever:hover (4/5/2006 20:33:11)

I'm by no means a CSS expert but I've used it often and as long as I use the LoVeHAte rule:

a:link { } a:visited { } a:hover { } a:active { }

never had any issues with it.




Tailslide -> RE: IE forms and whatever:hover (4/6/2006 3:15:59)

That's fine for links - I do exactly the same (plus focus) but for non-link things such as form inputs, IE doesn't recognise :hover or :focus so you have to use "other methods". whatever:hover seems to work - it just seems too easy a solution bearing in mind all the long scripts I've seen people employ to get this effect... I'm suspicious!




rdouglass -> RE: IE forms and whatever:hover (4/6/2006 10:18:38)

quote:

but for non-link things such as form inputs


I don't limit the LVHA to just links either. Sorry if I implied that but again, I've never seen any side effects with either.




Tailslide -> RE: IE forms and whatever:hover (4/6/2006 10:35:41)

quote:

ORIGINAL: rdouglass

quote:

but for non-link things such as form inputs


I don't limit the LVHA to just links either. Sorry if I implied that but again, I've never seen any side effects with either.


No what I'm trying to say is that it doesn't work in IE - unless there's a link present. You can't put a hover effect on a form input for instance without some extra form of scripting - you can in FF etc.

In FF etc you can do this:

input:focus


You can't in IE6 and earlier - well you can but it don't work!




Tailslide -> RE: IE forms and whatever:hover (4/6/2006 11:02:31)

Here's a test.

Form 1 will show hover effect on the form fields in FF (via :hover rule in CSS) - doesn't work in IE.

Form 2 works in FF as per the other one BUT also works in IE because I'm using the csshover.htc script which forces IE to use some psuedo classes like :hover and :focus on things that aren't links.

It just seems too easy - I want to know if anyone's found an issue with using csshover.htc for this purpose.




spitfire -> RE: IE forms and whatever:hover (4/6/2006 12:57:29)

quote:

ORIGINAL: Tailslide
It just seems too easy - I want to know if anyone's found an issue with using csshover.htc for this purpose.

Err... in some trepidation, slap me down with a diesel-driven deck-cloth it you will, 'cos I've already been told my tabbing skills are deficient today and I've never used whatever:hover to my eternal shame [&:]

But are the two input fields meant to show a pale blue background in both IE and Fx - form 2 (and form 1 in Fx), on hover and focus in the same way the textarea does?
input:focus, select:focus, textarea:focus {background:#f4f4f4;}
input:hover, select:hover, textarea:hover {background:#f4f4f4;}

They do not change for me. Opera, on the other hand, shows pale blue on all three fields on hover and tab (for non-links).

Is there anything of import in these little notes insofar as they relate to IE, but, apparently, not to Fx?
From peterned
quote:

NOTE 1: The rules for HTCs have changed a bit in Windows XP SP2. Users with SP2 installed may not see it working correctly, because webservers have to send htc files with the mime-type set to text/x-component. For more info on this, check Aldo's blog.

then... a bit of a ramble
quote:

NOTE 3: Version 2.0 also supports the :focus pseudo class for A, INPUT and TEXTAREA elements. However, because a selector like "input:focus" is returned as "input:unknown" by IE's stylesheet object, the script has to attach focus and blur events based on these unknowns, which might as well be other unrecognized pseudo classes. Hence, when using the 2.0 version, you CAN NOT use pseudo classes that are not recognized by IE on A, INPUT or TEXTAREA elements, since they would be used as focus styles. If you need these classes anyway, use 1.4.

Got me beat [X(]





Tailslide -> RE: IE forms and whatever:hover (4/6/2006 13:20:16)

Yes I saw those bits - I tried initially using the older version of the script but couldn't get focus to work in IE (hover seemed ok). So just for a laugh I tried the newer one and both hover and focus (for input and textareas) worked fine on my PC (IE6 SP2 and standalone IE5). Seems ok in Opera for me too....

I might have a go via browsercam see if it's possibly some local effect.

You see why I thought it all sounded too easy?





Tailslide -> RE: IE forms and whatever:hover (4/6/2006 13:32:08)

I found an article by Anne the Man about it - it seems that it should work as described as long as used with care:

http://annevankesteren.nl/2004/01/selectorhover-in-internet-explorer

So I'll leave it in for the moment and monitor the situation.




spitfire -> RE: IE forms and whatever:hover (4/6/2006 13:52:21)

quote:

ORIGINAL: Tailslide
... both hover and focus (for input and textareas) worked fine on my PC (IE6 SP2 and standalone IE5) ....

I have suspected for some time I was getting too old for this lark. Time to retire and watch the grass grow, methinks.[:)]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.078125