What you’re looking for is an image map.
But… That doesn’t work with background images, so if you need it on the background image you’ll have to do it in a different way.
For background images, you can create something like this that will position an area over the background element:
HTML code:
<div class="with_background">
<a href="http://www.link" id="my_link">My Link</a>
</div>
CSS Code:
.with_background {
position: relative;
}
#my_link {
position: absolute;
top: 100;
left: 100;
display: block;
width: 100px;
height: 100px;
}
Of course you’ll need ot do your own styling and positioning, but that’s the basics of it.
I followed your instructions, but no joy! My cursor doesn’t turn into a pointing finger. It would seem logical to place a <div> right squarely over the portion of the body I want to be an image map hotspot, but it doesn’t work.
Perhaps I should tell you that I’m using a custom theme designed by someone else. Maybe this makes a difference.
Thank you very much for weighing in.
No… if you have anything covering the link are, then that will… cover it. Custom theme or not doesn’t make a difference.
But… As custom themes aren’t supported by these forums, you should ask your designer/developer for more assistance.
The link area was clear, but still no go. My designer is no longer available, which is why I’m mastering this site myself. The hotspot is not a huge issue, just something I wanted to do. Maybe I’ll figure something out someday.
Cheers and thanks again.
http://www.image-maps.com/
Check that link, I used it to create an image map recently and it worked out very well.
To Catacaustic:
I have a brand new problem relating to the HTML/CSS code you listed above. When the code did not work, I removed it, but for some strange reason, the HTML text I used between the “a href” links still lingers on my page! I have cleared the cache of every browser I have, to no avail. Then I cleared the cache of the plugin WP Super Cache and I even deactivated WP Super Cache. Still, no joy. After reactivating WP Super Cache, the text yet remains!
To Evan Herman:
Thanks for the link. I’ll look into that program.