Jump to content

Using <area> & "style=pointer:cursor;"


GBS

Recommended Posts

Hi to all,

So, the plan is to change the cursor using map/area tags,...

If you could please check the link: [a href=\"http://bdmusique.free.fr/scripts/s1/\" target=\"_blank\"]testing,,[/a]
You could see what I've tried,, without success,, :(

The best result I get is:
[code]
<map id ="map4" name="map4" onmouseover="window.document.body.style.cursor='pointer';" onmouseout="window.document.body.style.cursor='default';">
<area  shape ="poly" coords="5, 0, 100, 10, 94, 66, 0, 50">
</map>
[/code]
That one works with IE, but not with FF,, (& I'm pretty sure there is a little bug with firefox, while using <area> tags & cursor properties,,...)

so my question would be,... is it do-able or not ? :)

Thanks in advance for any help/hack/tips on it,,

l8tr,,
Link to comment
Share on other sites

You need to apply the effect to the image rather than the body and place it in the area tag instead of the map tag, kinda like this
[code]
<img id="img_id" src="image.gif" border="0" usemap="#map4" />
<map id ="map4" name="map4">
<area  shape ="poly" coords="5, 0, 100, 10, 94, 66, 0, 50" onmouseover="document.getElementById('img_id').style.cursor='pointer';" onmouseout="document.getElementById('img_id').style.cursor='';">
</map>
[/code]
but this won't work on Opera.
Link to comment
Share on other sites

Its not so much a bug with Firefox, more of the fact that Firefox is strict when it comes to rendering pages where IE is relaxed. IE will let you get away with a lot more than Firefox will. Make a small error in some HTML and it'll go unnoticed in IE.
Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.