By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,238 Members | 1,565 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,238 IT Pros & Developers. It's quick & easy.

Re: Hover over text (no link) changes background color not in IE?

P: n/a
Moon wrote:
I'm slowly getting back into webdesign and I'm not sure I'm doing it right.
I have 2 sentences of spoiler text on my page which I've coloured black,
only when you move the mouse over it the color should be switched to make
the line readable. I've used this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
#spoiler {
background: #000000;
color: #000000;
}

#spoiler:hover {
background: #FFFFFF;
}

Works fine in FF2 and Opera 9, how do I make it work in IE? TIA!
If spoiler is NOT an A element with an HREF attribute (i.e., a link)
:hover pseudo class will not work is <IE7.

JavaScript is the usual IE work-a-round. Stinks doesn't it?

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Aug 30 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.