Good day, there was a problem there is a link here html

<a href="#" class="link"></a> 

here is css

 .link{ display:block; height:10px; width:10px; background:url(img.jpg);} .link:hover{ background:url(img2.jpg);} 

And everything would be fine, but as a link in it does not work, not in one. If the link is filled with any text then it works. Even the hover for an example and that does not work

    1 answer 1

    See an example

    You have not closed the parenthesis here:

     background:url(img.jpg} 

    In addition, you need to specify display: block;

     .link{ height:10px; width:10px; background:url(img.jpg); display: block; } 
    • I wrote this code for another example :) now I will correct it - Sergalas