Urgent Plz Help How to use hover for image

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ansuiya
    New Member
    • Jan 2007
    • 40

    Urgent Plz Help How to use hover for image

    he y frnds plz chk out the following code:

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

    css code:
    Code:
    .rollover A
    {
    	background:url(../images/home.gif);
    }
    .rollover A:hover
    {
    	background:url(../images/home_h.gif);
    }
    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.
  • AricC
    Recognized Expert Top Contributor
    • Oct 2006
    • 1885

    #2
    Originally posted by Ansuiya
    he y frnds plz chk out the following code:

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

    css code:
    Code:
    .rollover A
    {
    	background:url(../images/home.gif);
    }
    .rollover A:hover
    {
    	background:url(../images/home_h.gif);
    }
    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:
    Code:
    background-image:('YOUR URL')

    Comment

    Working...