Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cursor : Invalid property value

I've been looking for this for a long time now. All I've found doesn't work for me sadly.

My custom cursor won't work on Firefox, I've a beautiful "Invalid property value". Also in Firefox Developper Edition I've the same error but the cursor is displayed. No problem in Chrome, it's displayed without any error.

There is no problem with my PNG I believe, it's fit all the requierement to be compatible with Firefox.

The code is simple, I don't need to show you more.

body {
  cursor: url('cursor.png'), pointer;
}

And the cursor.png image:

Edit: It's looks like a css rules body:not([id]) is showing up as I inspect element:

This rule is not in my CSS files and I've no idea what it is doing here. Any ideas how to remove it?

Edit 2: Found out that it's NoScript ( add-on ) on Firefox which force this css properties. Can't find a way to remove it though.

like image 590
Ernoud Dylan Avatar asked May 18 '16 18:05

Ernoud Dylan


People also ask

What is the cursor property?

The cursor property specifies the mouse cursor to be displayed when pointing over an element.

What is cursor property in CSS?

The cursor CSS property sets the mouse cursor, if any, to show when the mouse pointer is over an element.

How do I change the cursor type in HTML?

You can simply use the CSS cursor property with the value pointer to change the cursor into a hand pointer while hover over any element and not just hyperlink. In the following example when you place the cursor over the list item, it will change into a hand pointer instead of the default text selection cursor.

How do I customize my cursor in CSS?

Answer: Use the CSS cursor property You can define a custom cursor using the CSS cursor property. The cursor property takes the comma-separated list of user-defined cursors value followed by the generic cursor. First of all create cursor image and save it with the extension .


2 Answers

You should add 2 more parameters like this :

cursor:  url(cursor2.png) 2 2, pointer;

please read this mozila guide : https://developer.mozilla.org/en-US/docs/Web/CSS/cursor

like image 61
Nihar Sarkar Avatar answered Nov 09 '22 00:11

Nihar Sarkar


I had a similar problem. Fixed it by adding "auto" to the end:

cursor: url('cursor.png'), auto;
like image 23
melvin toast Avatar answered Nov 09 '22 00:11

melvin toast