how to fit the background image to the containing anchor element?
Posted
by Lina
on Stack Overflow
See other posts from Stack Overflow
or by Lina
Published on 2010-04-21T09:56:44Z
Indexed on
2010/04/21
10:13 UTC
Read the original article
Hit count: 330
css
Hi, I'm trying to design a link with an image background, question is if the image is too large, how do i fit it to the width and height of the anchor using css?
<a href="#"></a>
<style>
a
{
display: block;
padding: 5px 12px;
border: 1px solid black;
width: 10px;
height: 10px;
background-image: url('/Scripts/images/downarrow_blue.png');
}
</style>
tia, Lina
© Stack Overflow or respective owner