Make a background-image clickable with CSS
Monday, April 30th, 2007Make a background-image clickable with CSS
HTML:
<div id="top">
<a href="http://www.blahwhatever.org/2007/home.html"><span>Blah Page</span></a>
</div>
Stylesheet:
#top
{
background-image: url(../2007/images/top07.gif);
background-repeat: no-repeat;
background-position: top left;
width: 961px;
height: 95px;
}
#top a
{
width: 300px;
height:95px;
display: block;
text-decoration:none;
}
#top a span {
visibility: hidden;
}