Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > CSS :hover and Internet Explorer 6?

Reply
Thread Tools

CSS :hover and Internet Explorer 6?

 
 
Erik Harris
Guest
Posts: n/a
 
      06-25-2003
Does Internet Explorer 6 support the CSS ":hover" attribute, or am I simply
doing something wrong? All of the links on my websites (linked to in my
signature) change color when the mouse hovers over them in Mozilla, but
nothing happens in Internet Explorer 6.

--
Erik Harris n$wsr$ader@$harrishom$.com
AIM: KngFuJoe http://www.eharrishome.com
Chinese-Indonesian MA Club http://www.eharrishome.com/cimac/

The above email address is obfuscated to try to prevent SPAM.
Replace each dollar sign with an "e" for the correct address.
 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      06-25-2003
Erik Harris wrote:

> Does Internet Explorer 6 support the CSS ":hover" attribute


Only on <a> elements

> or am I simply doing something wrong?


MSIE doesn't support attribute selectors, so it doesn't recognise
a[href]:hover.

Use a:link:hover and a:visited:hover instead.

--
David Dorward http://david.us-lot.org/
Redesign in progress: http://stone.thecoreworlds.net/
Microsoft announces IE is dead (so upgrade):
http://minutillo.com/steve/weblog/20...ces-ie-is-dead
 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      06-25-2003
"rf" <(E-Mail Removed)> wrote:

> IE doesn't support a[href]:hover. Use a:hover or .content a:hover or
> whatever.


David's suggestion to use a:link:hover and a:visited:hover is better,
since Mozilla treats :hover as applying to almost any element, so if
there's e.g. <a name="...">...</a> somewhere, it would match a:hover.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      06-25-2003

"Jukka K. Korpela" <(E-Mail Removed)> wrote in message
news:Xns93A5865C755A3jkorpelacstutfi@193.229.0.31. ..
> "rf" <(E-Mail Removed)> wrote:
>
> > IE doesn't support a[href]:hover. Use a:hover or .content a:hover or
> > whatever.

>
> David's suggestion to use a:link:hover and a:visited:hover is better,
> since Mozilla treats :hover as applying to almost any element, so if
> there's e.g. <a name="...">...</a> somewhere, it would match a:hover.


Good point.

Cheers
Richard.


 
Reply With Quote
 
Erik Harris
Guest
Posts: n/a
 
      06-25-2003
On Wed, 25 Jun 2003 01:57:07 +0100, David Dorward <(E-Mail Removed)> wrote:

>Erik Harris wrote:
>
>> Does Internet Explorer 6 support the CSS ":hover" attribute


>Only on <a> elements


That's kind of a pain, especially if you want it to behave differently on
text links and image links. For example, I've got:

a[href]:hover { color: #EEA; background: transparent; text-decoration:
underline }
a:hover IMG {border: 1px solid #EEA}

Neither works. So apparently, IE not only doesn't support attribute
selectors, but it also doesn't support context-dependent styles (a:hover
IMG). I don't want the text links to have a 1 pixel solid border, so
combining them into one doesn't appear to be an option.

>> or am I simply doing something wrong?


>MSIE doesn't support attribute selectors, so it doesn't recognise
>a[href]:hover.


>Use a:link:hover and a:visited:hover instead.


The reason I didn't just use "a:hover" (or the above choices) is because I
didn't want my <a name=""> place-mark links to be hilighted. And I believe
the Validator balked at <a name="text"></a> (which is fine when its only
purpose is to mark the beginning of a section) because it didn't like an
empty <a></a>.

--
Erik Harris n$wsr$ader@$harrishom$.com
AIM: KngFuJoe http://www.eharrishome.com
Chinese-Indonesian MA Club http://www.eharrishome.com/cimac/

The above email address is obfuscated to try to prevent SPAM.
Replace each dollar sign with an "e" for the correct address.
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      06-26-2003
Erik Harris <n$wsr$ader@$harrishom$.com> wrote:

> It still doesn't help the case of the contextual selector I'd like
> to use, though (a:hover IMG), since IE only allows :hover with <a>,
> and since I want borders around hovered link images, but not text
> links.


You can use e.g.

:link img { border: solid blue thin; }
:visited img { border: solid #939 thin; }
:link:hover img, :visited:hover img { border-color: red; }

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
Erik Harris
Guest
Posts: n/a
 
      06-26-2003
On Thu, 26 Jun 2003 06:48:52 +0000 (UTC), "Jukka K. Korpela"
<(E-Mail Removed)> wrote:

>Erik Harris <n$wsr$ader@$harrishom$.com> wrote:
>
>> It still doesn't help the case of the contextual selector I'd like
>> to use, though (a:hover IMG), since IE only allows :hover with <a>,
>> and since I want borders around hovered link images, but not text
>> links.

>
>You can use e.g.
>
>:link img { border: solid blue thin; }
>:visited img { border: solid #939 thin; }
>:link:hover img, :visited:hover img { border-color: red; }


Thanks, I'll give that a go.

--
Erik Harris n$wsr$ader@$harrishom$.com
AIM: KngFuJoe http://www.eharrishome.com
Chinese-Indonesian MA Club http://www.eharrishome.com/cimac/

The above email address is obfuscated to try to prevent SPAM.
Replace each dollar sign with an "e" for the correct address.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Explorer 8: C:\Program Files\Internet Explorer\iexplore.exe vs C:\Program Files (x86)\Internet Explorer\iexplore.exe Nathan Sokalski Windows 64bit 16 02-22-2010 08:31 AM
internet explorer 7 - Internet Explorer cannot display the webpag sandy j Windows 64bit 0 05-02-2009 02:12 AM
css and internet explorer nicolacantalupo HTML 8 01-11-2008 01:14 AM
trouble with css positioning, javascript and internet explorer Coyote HTML 2 10-16-2006 01:25 AM
Loading problem from Internet explorer of an html with CSS and PNG Bubu HTML 3 08-02-2005 09:04 AM



Advertisments