Custom cursor image doesn't work in all IEs?
Unfortunately, cursor
is plain buggy in IE, at least until and including 8
In Internet Explorer for Windows up to and including version 8, if a
relative URI value is specified in an external style sheet file the
base URI is considered to be the URI of the document containing the
element and not the URI of the style sheet in which the declaration
appears.
http://reference.sitepoint.com/css/cursor
You may want be able to use a conditional comment
to target IE and then feed it a modified style rule with a different url
.
Custom cursor property not working IE browser
IE doesn't support png format for cursor.
You need convert to "cur" format.
The css code will look like this
h1{cursor: url(http://myworkstudio.com/app/cursor1.cur), pointer}
You can refer below url:
http://chevronscode.com/index.php/ie-custom-cursor.html
CSS custom cursor doesn't work in FF/Chrome
The problem is not just with your css code lacking second argument but with the image file.
If you simply resize, make it smaller (i tried 32px for testing purposes) it works like a charm.
You might also want "pointer" rather than auto, judging by the look of the image;
cursor: url('http://anuary.com/dev/hp/pad3/public/images/hand-cursor.png'), pointer;
EDIT:
i realize now you wanted to keep the size but it just won't work. see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Basic_User_Interface/Using_URL_values_for_the_cursor_property for more info
css custom cursor not working
I was dealing with this problem last night. The issue is that there is a limit to the size of the image you can use as a cursor. If you really need an image that large to follow the cursor, have a div with that image snap to the cursor position on the mousemove event.
MDN at least describes the size limit for Firefox:
In Gecko (Firefox) the limit of the cursor size is 128×128px. Larger cursor images are ignored. However, you should limit yourself to the size 32×32 for maximum compatibility with operating systems and platforms.
MDN documentation for cursor property in CSS
Put in this smiley rather than the image you're using as the URL and run the Fiddle again, and it works: http://icons-search.com/img/icons-land/IconsLandVistaStyleEmoticonsDemo.zip/IconsLandVistaStyleEmoticonsDemo-ICO-Cool.ico-32x32.png
Cursor image not working in IE
IE doesn't support normal graphics, you need a cursor file .cur
.
See also:
- quirksmode.org: compatibility list: Cursor
- MDN: Using URL values for the cursor property
Using external images for CSS custom cursors
It wasn't working because your image was too big - there are restrictions on the image dimensions. In Firefox, for example, the size limit is 128x128px. See this page for more details.
Additionally, you also have to add in auto
.
jsFiddle demo here - note that's an actual image, and not a default cursor.
.test {
background:gray;
width:200px;
height:200px;
cursor:url(http://www.javascriptkit.com/dhtmltutors/cursor-hand.gif), auto;
}
<div class="test">TEST</div>
Related Topics
Font Weight Turns Lighter on MAC/Safari
How to Vertically Center an Image Inside of a Div Element in HTML Using CSS
How to Hide Scrollbar in Firefox
Css: Using Raw Svg in the Url Parameter of a Background-Image in Ie
Pure CSS Multiple Stacked Position Sticky
Overlay a Background-Image with an Rgba Background-Color
Twitter Bootstrap 3 - Panels of Equal Height in a Fluid Row
Centering the Image in Bootstrap
How to Change Only the Alpha of a Rgba Background Colour on Hover
On Ie CSS Font-Face Works Only When Navigating Through Inner Links
Set Position Absolute and Margin
Why "Overflow: Hidden" Clears a Float
How to Apply CSS to Iframe Content
Css3 ::Selection Behaves Differently in Ff & Chrome
Is There Any Pros and Cons If I Use Always CSS Class Instead CSS Id for Everything