Hey, I have this site: www.iLookup.info I'm working hard on its interface. In Firefox it works fine, but in IE, when you hover the mouse over the execute button, it doesn't glow How can I change the div's bg image with javascript? (Or can I use CSS differently than I do now?) Thanks, -Matt
Try playing with this: http://www.w3schools.com/css/tryit.asp?filename=trycss_float5 and other examples they have.
I can't figure it out If anybody could help me specifically with iLookup, it'd be GREATLY appreciated. Thanks though
Use.. onmouseover="javascript:glowOn();" onmouseout="javascript:glowOff;" in the definition of the div glowOn and glowOff are javascript functions that you define to make your divs glow
function glowOn() { document.getElementById("ID OF OBJECT").style.backgroundImage = "url('path/to/secondaryimage.jpg')"; } function glowOff() { document.getElementById("ID OF OBJECT").style.backgroundImage = "url('path/to/originalimage.jpg')"; }
you can always place the functions directly in the onmouseover and onmouseout declarations directly as well
the only issue with using js for mouseover is if your users have javascript disabled. Why not use css to do this?
so how would you process this without javascript as i have never seen a pure css solution for something like this. please do tell us..
Here's an example for non IE (If you need images, use css sprites to reduce http requests) http://www.webvamp.co.uk/blog/coding/css-image-rollovers/ To add IE functionality you could use csshover.htc (google it) which does contain javascript which contradicts what I just said. haha. It says that IE8+ now supports :hover on all elements where previous versions only supported href tags. http://www.quirksmode.org/css/hover.html