pookeyblow
12-02-2009, 10:13 AM
I'm having a little problem. I have a div with a background-image and I want to use it as a link.
my code:
<style type="text/css">
#infobox {
position: fixed;
left: 30px;
bottom: 0px;
width: 60px;
height: 35px;
background-image:url(infobox.png);
background-repeat: no-repeat;
}
#infobox img, #topcontrol img {
width: 50px!important;
vertical-align: bottom;
}
</style>
<div id="infobox">
<a href="info.html" rel="shadowbox;height=500;width=700"></a>
</div>
I only get it to work when I put some text between the <a> tags like this:
<div id="infobox">
<a href="info.html" rel="shadowbox;height=500;width=700">now it works (but for this text only)!!</a>
</div>
I want the whole div to work as a link so i can get my js code to work properly!
Does anyone know what I can do to get my div to behave as a link?
thanks!
my code:
<style type="text/css">
#infobox {
position: fixed;
left: 30px;
bottom: 0px;
width: 60px;
height: 35px;
background-image:url(infobox.png);
background-repeat: no-repeat;
}
#infobox img, #topcontrol img {
width: 50px!important;
vertical-align: bottom;
}
</style>
<div id="infobox">
<a href="info.html" rel="shadowbox;height=500;width=700"></a>
</div>
I only get it to work when I put some text between the <a> tags like this:
<div id="infobox">
<a href="info.html" rel="shadowbox;height=500;width=700">now it works (but for this text only)!!</a>
</div>
I want the whole div to work as a link so i can get my js code to work properly!
Does anyone know what I can do to get my div to behave as a link?
thanks!