csscss-sprites

Border-radius bleeding


I want to give border-radius to a <nav> in which all the <a> have an image has background, but the image keeps going outside the border-radius. Why is that?


Solution

  • To fix this in all browsers you should use:

    -moz-background-clip: padding; 
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    

    I found the answer here