5 replies [Last post]
CSSelgreco1965
CSSelgreco1965's picture
Offline
Enthusiast
Greece
Last seen: 11 years 23 weeks ago
Greece
Timezone: GMT+3
Joined: 2004-06-13
Posts: 51
Points: 28

Sad

I was looking on zengardens and saw a css idea I liked for my website I'm developing. Basically when you roll over a piece of text it changes the colour from 'say' grey to white.
It works fine on my macintosh, but I saw the site on a PC today and it didn't work.

All it is is basically:

div {
	color: #9296A2;
}

div:hover {
	color: #ffffff
}

div * {
	color: #9296A2
}
div:hover * {
	color: #E7E7F1
}

The web becomes a tangled mess when Microsoft gets involved!

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 39 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

hilite text on <div> not working on IE?

IE does not support the use of psuedo class :hover on anything other than anchors sadly, but there is a solution do a search for whatever hover or csshover.htc on this forum, I had a discussion about this solution and left links.

If you have no luck post back and I'll find the links for you.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

DanA
DanA's picture
Offline
Elder
Last seen: 12 years 22 weeks ago
Timezone: GMT+2
Joined: 2004-08-14
Posts: 1087
Points: 2

hilite text on <div> not working on IE?

with IE 5.5 (and 6?) div:hover can destroy all the layout

DanA
DanA's picture
Offline
Elder
Last seen: 12 years 22 weeks ago
Timezone: GMT+2
Joined: 2004-08-14
Posts: 1087
Points: 2

hilite text on <div> not working on IE?

but you can have a look there
http://www.xs4all.nl/~peterned/csshover.html

CSSelgreco1965
CSSelgreco1965's picture
Offline
Enthusiast
Greece
Last seen: 11 years 23 weeks ago
Greece
Timezone: GMT+3
Joined: 2004-06-13
Posts: 51
Points: 28

hilite text on <div> not working on IE?

OK

I've downloaded the htc file put it in my style folder and put the behaviour code into the body attribute of my css file.

Do I need to add anything to the div tag or anything, as it still doesn't work. What is the path relative too aswell?

Thanks

Rob

The web becomes a tangled mess when Microsoft gets involved!

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 39 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

hilite text on <div> not working on IE?

It will be a problem with the relative path as IE handles the path for .htc differently? I think that it is relative to the html but I get confused with all the different paths I have to remember Smile :? have a play around; there is mention of the path problem on the site

Hugo.

Edit: Just had a look and the latest version seems to have fixed the problems with url paths

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me