Jump to content


Photo

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


  • Please log in to reply
3 replies to this topic

#1 GBS

GBS
  • Members
  • PipPipPip
  • Advanced Member
  • 108 posts

Posted 29 May 2006 - 04:31 PM

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:
<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>
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,,
Sorry for my english,... I do my best, but sometimes,...
1st intention: understand the problem
2nd intention: try to solve it
3rd intention: try to understand how to solve it :)

#2 nogray

nogray
  • Members
  • PipPipPip
  • Advanced Member
  • 930 posts
  • LocationSan Francisco CA

Posted 30 May 2006 - 06:27 PM

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
<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>
but this won't work on Opera.

NoGray.com


#3 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 31 May 2006 - 09:33 AM

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.
Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them

#4 GBS

GBS
  • Members
  • PipPipPip
  • Advanced Member
  • 108 posts

Posted 13 June 2006 - 11:54 PM

Hi,,

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

l8tr,,


Sorry for my english,... I do my best, but sometimes,...
1st intention: understand the problem
2nd intention: try to solve it
3rd intention: try to understand how to solve it :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users