Jump to content

hovering background image problem with IE


e1seix

Recommended Posts

rather simple code really, don't think i need to post the full html code. the idea obviously being that when the user hovers over a link, the background image changes to a different image and back again when not hovered over.

 

in Firefox, not a problem - in IE, the hovering background image remains when the user has stopped hovering over the link

 

#advice { float:left;height:150px;width:450px; }
#advice a img { background-image:url('/images/advice.jpg');border:none;height:150px;width:450px; }
#advice a:hover img { background-image:url('/images/shop.jpg');border:none;height:150px;width:450px; }

#shop { float:left;height:150px;width:450px; }
#shop a img { background-image:url('/images/shop.jpg');border:none;height:150px;width:450px; }
#shop a:hover img { background-image:url('/images/advice.jpg');border:none;height:150px;width:450px; }

 

The actual HTML image (advice_shop.gif) is of course transparent

 

echo '<div id="advice"><a href="/advice/"><img src="/images/transparent/advice_shop.gif" /></a></div>';
echo '<div id="shop"><a href="/shop/"><img src="/images/transparent/advice_shop.gif" /></a></div>';

 


Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.