padding not shifting my logo

Posted by paul smith on Stack Overflow See other posts from Stack Overflow or by paul smith
Published on 2012-06-16T03:08:15Z Indexed on 2012/06/16 3:16 UTC
Read the original article Hit count: 156

Filed under:
|

I have a logo link that's using a background-image (css sprite). All works fine, but when I try to add a 20px padding to the top of the link (to give it more space for user to click the link), the background image is not moving down. Here is my css:

a {
    background-image:url("sprite.png");
    background-repeat:no-repeat;
    display:block;
    height:70px;
    width:70px;
    padding-top:20px; /* give top of the link more click space */
}

And my html:

<a href="#" style="background-position:0 0;"></a>


What am I doing wrong?

© Stack Overflow or respective owner

Related posts about html

Related posts about css