I need to place an advertisement as a background image of my webpage. What's the best way to make the body background image a clickable link?
A:
Do something like this. Easy
<a href="yourlink.html" style="width:50px;height:50px;display:block;background:url(image.jpeg);">Text If you want</a>
Starx
2010-07-29 08:23:29
+1
A:
You can't make a background image clickable. Is your image taking the whole body space ?
Kaaviar
2010-07-29 08:24:22
The background image is shown on the left and right columns either side of the page content. This is the part that needs to be clickable
2010-07-29 08:40:54
Maris solution should work then.
Kaaviar
2010-07-29 08:44:51
+1
A:
Or you can you use javascript:
$("body").click(function(event){
event.stopPropagation();
alert('oh hai');
});
Māris Kiseļovs
2010-07-29 08:29:35