468,244 Members | 1,944 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,244 developers. It's quick & easy.

Background image with CSS on Hover effect

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
1 1881
7,435 Expert 4TB
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.

Similar topics

5 posts views Thread by Chris Beall | last post: by
6 posts views Thread by Nikolaos Giannopoulos | last post: by
3 posts views Thread by Mark Tranchant | last post: by
1 post views Thread by nick | last post: by
2 posts views Thread by chris_culley | last post: by
16 posts views Thread by stevedude | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.