tags:

views:

22

answers:

1
<a class="success" href="javascript:void(0)"></a>

//CSS for setting background for above link
a.success:hover{
//set background image
}

What my intent is to change the class of link on server side based on success/fail and set icon for the link accordingly. But above CSS is not working as expected.

Can someone plz help with this.

+2  A: 

There is nothing wrong with that css.

However, your link is empty so it will not take up any space meaning that a background image will not be shown.

You will need to put something in the a tag or make it a block level element in order for the element (and the background...) to show.

By the way, I am just assuming that you are not really using the // to comment in your style-sheet as that is not valid. Use /* */ if you want to comment in a style-sheet.

jeroen
thanks that helped :) .......
Anil Namde
You're welcome!
jeroen