0

I have written below code in my ASP.NET website to use the custom cursor. This works fine in IE 10 but shows black square in chrome.

element.style.cursor = "url(WebResources/CustomPointer.gif),auto";

Can someone please look into this advise as I have spent good time to fix this but nothing worked...

Dave Chen
  • 10,887
  • 8
  • 39
  • 67
  • What size is that cursor (there appears to be a browser-dependent limit)? Is it an animated gif? Could you convert to png and try again? – Hans Kesting Jun 26 '13 at 07:12
  • _"as I have spent good time to fix this but nothing worked..."_ - explain _what_ you have tried, so people won't have to resuggest the same things. – CodeCaster Jun 26 '13 at 07:32
  • 1
    See http://stackoverflow.com/questions/6623769/css-custom-cursor-doesnt-work-in-ff-chrome and http://stackoverflow.com/questions/4773312/custom-cursor-not-working-correctly-in-chrome – IvanL Jun 26 '13 at 10:03
  • sorry for the typo actually I am using .cur file (not gif) and code is something like below element.style.cursor = "url(WebResources/CustomPointer.cur),auto"; The size of .cur file is 1 kb and having hot spot 5,5 It works with png and gif file but doesn’t with .cur file in chrome and firefox. But in my project I have to use only .cur file for this. – user2388106 Jun 26 '13 at 23:58

1 Answers1

0

If you're using a .cur file, this is probably because you're using the "inverse" palette color in the cursor file (which is represented in the binary file as FF), which Chrome and Firefox don't support. They support the normal palette and setting the hotspot, but not the "inverse" color.

Jez
  • 27,951
  • 32
  • 136
  • 233