I have the following div tag:
<div id="headerimage"></div>
associated with this is the following css:
#headerimage
{
width: 897px;
height: 65px;
background: url('../images/headerimg.jpg');
}
I need the background image to be clickable to where when the user clicks it, it goes to url.
I did the following and it works but not sure if there is a more elegant way (Note how I have it within an anchor tag:
<a href="http://www.myurl.com">
<div id="headerimage"></div>
</a>
Nate,
You could just turn your anchor tag into a block element: http://jsfiddle.net/Vdfz8/
Hope that helps, and maybe even simplifies things for ya.
Cheers