using image map on bacground image
How can I use image map on background image that define in the css:
I want to set image map for it and define part of the image as a link.
background:white url('mivzakon_004.png') no-repeat center top;
You can't use a background image for an image map. Image maps require an <img> tag. The only way I can think of to do something like this would be to stack two <div>s using position:absolute and z-index, giving the bottom <div> your desired background image and using a transparent gif or png in an <img> tag to use for your image map. Good luck!
I made an image map as a background while still maintaining the clickable areas: Example Need more info on how, let me know.
Originally Posted by Major Payne
First thank you very much.
Something confusing me in your implementation.
from what I see you indeed used the img tag.
So far what do you need the background image if you use the img tag?
And the map is only for the image in the image tab and not for the image in the background, am I wrong?
The image map itself was put in as a background on the CSS. I took the same image and loaded it into my Xara graphics program and set it to full transparency and saved it as a .png. Then you'll maintain the image map as a background, but it has the clickable area on the transparent image.
I know you expected to just code the image map as a background and have its clickable areas still work, but not going to work that way for now. Since there are more ways to skin a cat, maybe someone will come up with a working example where only one image is used and called as a BG image. Thinking on it. Sorry if my idea didn't do exactly what you wanted. I do have some other ideas.
Users Browsing this Thread
There are currently 2 users browsing this thread. (0 members and 2 guests)
Tags for this Thread