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

Urgent Plz Help How to use hover for image

P: 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
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 1,892
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.