Span rollover (hover action) in IE

D

dafuk

Is there a good way to do a roll over action on a span?

I tried doing this using anchors, but it doesn't work in IE unless you
use href="#" which ruins the site concept (it's a toggle button using
AJAX) and having href="" kills the whole W3C thing (although if there
isn't a decent solution to having a span hover, then that's what I'll
have to do :( )

Any thoughts?
 
T

Toby Inkster

dafuk said:
Is there a good way to do a roll over action on a span?

Easy:

<span onmouseover="this.style.color='red';"
onmouseout="this.style.color='black';">Hello</span>

Better still to use a function.
 
N

Neredbojias

With neither quill nor qualm, Toby Inkster quothed:
Further, try IE7 <http://dean.edwards.name/IE7/>, a set of scripts to
improve IE's CSS2 behaviour -- then you'll be able to use the normal CSS
:hover pseudoclass on any element.

Will you please explain something to me. Is this "the" new IE7 in the
offing or is MS actually coming out with a new browser version in the
traditional sense of the phrase "new version"?
 
J

jgabbai

IE7 is an opensource JS add-on to patch IE so that it can behave
better. It is now an unfortunate name leading to much confusion (I
guess at the time, IE7 seemed like it was never going to happen). I
will look into IE7, but it seems that it is just going to add to the
download size... Maybe I can trim it so that only the hover pseudoclass
will work...
 
T

Toby Inkster

Neredbojias said:
Toby Inkster quothed:


Will you please explain something to me. Is this "the" new IE7 in the
offing or is MS actually coming out with a new browser version in the
traditional sense of the phrase "new version"?

No -- it's just a set of scripts that authors can add to their pages that
will trick IE into supporting a lot of extra CSS 2 stuff.

It was started at a time when Microsoft had just announced that Internet
Explorer 6 was going to be the last version of Internet Explorer ever. At
that time, choosing the name "IE7" for Dean's scripts didn't seem very
confusing. Of course, now Microsoft is planning to release a real browser
called Internet Explorer 7, it's not as sensibly named any more!
 
N

Neredbojias

With neither quill nor qualm, (e-mail address removed) quothed:
IE7 is an opensource JS add-on to patch IE so that it can behave
better.

Ah, I see.
It is now an unfortunate name leading to much confusion (I
guess at the time, IE7 seemed like it was never going to happen). I
will look into IE7, but it seems that it is just going to add to the
download size... Maybe I can trim it so that only the hover pseudoclass
will work...

Well, I do a lot of js to get-around IE6's limitations, too, but that
doesn't really fix anything. Your efforts are admirable, but the
problem actually is Microsoft's shitty attitude.
 
N

Neredbojias

With neither quill nor qualm, Toby Inkster quothed:
No -- it's just a set of scripts that authors can add to their pages that
will trick IE into supporting a lot of extra CSS 2 stuff.

It was started at a time when Microsoft had just announced that Internet
Explorer 6 was going to be the last version of Internet Explorer ever. At
that time, choosing the name "IE7" for Dean's scripts didn't seem very
confusing. Of course, now Microsoft is planning to release a real browser
called Internet Explorer 7, it's not as sensibly named any more!

I anxiously await something that absolves the need to band-aid-script
Internet Explorer's flaws. During the "big trial", Microsoft execs
argued that IE wasn't really a web browser. The joke of this is that
they were more right than they knew.
 
V

Vladdy

Is there a good way to do a roll over action on a span?

I tried doing this using anchors, but it doesn't work in IE unless you
use href="#" which ruins the site concept (it's a toggle button using
AJAX) and having href="" kills the whole W3C thing (although if there
isn't a decent solution to having a span hover, then that's what I'll
have to do :( )

Any thoughts?
www.vladdy.net/demos/iepseudoclassesfix.html
 
T

Toby Inkster

Neredbojias said:
I anxiously await something that absolves the need to band-aid-script
Internet Explorer's flaws.

MSIE7 will *apparently* feature some major improvements, including:

* PNG alpha-blending
* Full support for :hover
* RSS
* tabbed browsing
 
N

Neredbojias

With neither quill nor qualm, Toby Inkster quothed:
MSIE7 will *apparently* feature some major improvements, including:

* PNG alpha-blending
* Full support for :hover
* RSS
* tabbed browsing

Well I hope it also includes position:fixed and max-/min-width and a
normalized overflow and several other things I could think of if I
wasn't in a hurry to get to the porn sites.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top