Home › Forums › CSS › Best way to overlay a link button to a .png image? › Reply To: Best way to overlay a link button to a .png image?
Hi,
I am a professional web designer working in a reputed website design company and have tried this code. It works:
Change your html to:
<a class="image"></a>
Then add your css to:
.image:before {
display: block;
content:url('http://LinkToMyImage');
// You should also be able to safely eliminate// when setting
position: absolute, but included it just in case you
// experienced problems setting width and height
display: block;
height: 169px;
width: 220px;
position: absolute;
// top 0 is usually inferred when setting position: absolute;
// you should be able to remove this
top: 0px;
right: 0px;
}