469,934 Members | 1,847 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Urgent Plz Help How to use hover for image

40
he y frnds plz chk out the following code:

[HTML]<td align="center" class="rollover"><a href="#">home</a></td>[/HTML]

css code:
Expand|Select|Wrap|Line Numbers
  1. .rollover A
  2. {
  3.     background:url(../images/home.gif);
  4. }
  5. .rollover A:hover
  6. {
  7.     background:url(../images/home_h.gif);
  8. }
i want tht the code written above should work but there is no need for writing home in above html code but it works only if i add home in html code. but there is an image for home which will b replaced for another home image on its rollover.the background for td wud not change only the image for home will b replaced.Please suggest.
Feb 17 '07 #1
1 2397
AricC
1,892 Expert 1GB
he y frnds plz chk out the following code:

[HTML]<td align="center" class="rollover"><a href="#">home</a></td>[/HTML]

css code:
Expand|Select|Wrap|Line Numbers
  1. .rollover A
  2. {
  3.     background:url(../images/home.gif);
  4. }
  5. .rollover A:hover
  6. {
  7.     background:url(../images/home_h.gif);
  8. }
i want tht the code written above should work but there is no need for writing home in above html code but it works only if i add home in html code. but there is an image for home which will b replaced for another home image on its rollover.the background for td wud not change only the image for home will b replaced.Please suggest.
Change your CSS to:
Expand|Select|Wrap|Line Numbers
  1. background-image:('YOUR URL')
  2.  
Feb 17 '07 #2

Post your reply

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

Similar topics

12 posts views Thread by Sander Tekelenburg | last post: by
8 posts views Thread by JLahm | last post: by
3 posts views Thread by Gnolen | last post: by
7 posts views Thread by Cate Archer | last post: by
8 posts views Thread by Haines Brown | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.