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

Background image with CSS on Hover effect

P: 25
I have an mouseover effect with css on hover, which change the image on hover through Css.

It works with IE fine but have problem with Mozilla, as the background image not coming full on hover. If i add padding-top:10px; in Css it comes fine with Mozilla but IE padding is to much.

Can you help me with the same
Expand|Select|Wrap|Line Numbers
  1. a
  2. {
  3. background-image: none;
  4. padding: 10 0 0 0;
  5. height:24px;
  6. }
  7. a:hover
  8. {
  9. background-image: url(../images/start_1.gif);
  10. background-repeat: no-repeat;
  11. }
  12. <td class="change"><a href="#"><img id="imgname" border="0" src="images/start_on.gif" /></a></td>
Apr 1 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 7,435
I think what you really want to do is have your background image in the <td> and cover it with the <img>. Then, when hovering over the image, set it to 'display:none'
Apr 1 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.