Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross-browser 'cursor:pointer'

Tags:

css

I found these CSS attributes, that make the cursor look like a hand:

  • IE - style="cursor: hand;"
  • NS6/ IE6 - style="cursor: pointer;"
  • Cross Browser - style="cursor: pointer; cursor: hand;"

However I notice that Stack Overflow is using "cursor: pointer" in its CSS. However, this apparently work also on IE.

So ... what gives? What is the correct, browser-independent way to use this CSS item?

like image 943
ripper234 Avatar asked Jan 16 '10 06:01

ripper234


People also ask

Why is my cursor pointer not working?

Check that the battery of the mouse is charged. Make sure that the receiver (dongle) is firmly plugged in to the computer. If your mouse and receiver can operate on different radio channels, make sure that they are both set to the same channel.

How do I make my cursor hover?

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.

What does cursor pointer do?

A mouse cursor, also known as a mouse arrow, or mouse pointer, is a graphical image used to activate or control certain elements in a graphical user interface. More plainly, it indicates where your mouse should perform its next action, such as opening a program or dragging a file to another location.


1 Answers

According to Quirksmode, the only cross-browser syntax is:

element {     cursor: pointer;     cursor: hand; } 

They give some more information about the cursor as well:

In the past the hand value was Microsoft's way of saying pointer; and IE 5.0 and 5.5 only support hand. Because it's the cursor value that's used most often, most other browsers have also implemented hand.

Since IE 6 and 7 support pointer, there's no more reason to use hand, except when older IEs are part of your target audience.

I think the page you linked to might be a little outdated with the newest browsers.

like image 173
Kaleb Brasee Avatar answered Sep 26 '22 02:09

Kaleb Brasee