Is it possible to add a hotspot inside a div with a background image?
Many thanks.
Erik
Is it possible to add a hotspot inside a div with a background image?
Many thanks.
Erik
Yep sure is, just use an absolutely positioned link inside a relatively positioned div (with a background image).
Sample HTML
<div class="hotspot-container">
<a href="some-href-for-the-hot-spot" class="hotspot"> </a>
</div>
CSS
.hotspot-container {
width: 200px; height: 200px;
position: relative;
background: url(some-background-image) no-repeat;
}
.hotspot-container .hotspot {
width: 10px; height: 10px;
position: absolute;
top: 20px; /* Top coord of hotspot (relative to parent, bottom: 20px is also valid) */
left: 20px; /* Left coord of hotspot (right: 20px is also valid); */
}