Jump to content

Archived

This topic is now archived and is closed to further replies.

GBS

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

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,,

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Hi,,

Yesideez,, nogray,,
Thanks for the tips & the infos,,... I will check that & do some more tests,,

l8tr,,

Share this post


Link to post
Share on other sites

×

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.