Santhosh Kumar
Santhosh Kumar

Reputation: 1732

Is cursor type pointer deprecated?

I tried using cursor:pointer to my div but still I get the default cursor type on hovering it. What am I doing wrong?

I checked other live sites also, this problem resides all over. Not sure whether it has been deprecated or I'm doing something wrong.

div{
  width:100px;
  height:100px;
  background:red;
}
div:hover{
  cursor:pointer
}
<div>

</div>

Upvotes: 2

Views: 501

Answers (4)

Santhosh Kumar
Santhosh Kumar

Reputation: 1732

Thanks for your swift response. You guys wont believe it. As suggested by luciferous in the comment. I tried tring off photoshop. It worked like a GEM. But dunno what could be the reason for photoshop turning off to deal with browser cursor pointer. But still issue has been resolved. This might be funny solution but it worked

Upvotes: 1

neophyte
neophyte

Reputation: 6626

Cursor pointer is not depricated, it might be some bug in your browser. In this example you can differentiate between cursor type. Also check this website for reference

#a1{
  width:100px;
  height:100px;
  background:red;
}
#a2{
  width:100px;
  height:100px;
  background:blue;
}
#a3{
  width:100px;
  height:100px;
  background:green;
}
#a3:hover{
  cursor:default
}
#a2:hover{
  cursor:pointer
}
#a1:hover{
  cursor:help
}
<div id="a1">

</div>
<div id="a2">

</div >
<div id="a3">

</div >

Upvotes: 0

555
555

Reputation: 157

As you may check in here, this is not deprecated. Browser compatibility information is also present on this web site.

You can check the compatibility with this web site. to get the full info.

Upvotes: 1

Tschallacka
Tschallacka

Reputation: 28722

Use

div:hover{
    cursor: pointer;
    cursor: hand;
}

By using two properties repeatedly, the one with the invalid/not supported value will be ignored as per css spec, and the next line will be executed.

I'm using this for years, since the netscape navigator/internet explorer wars, and aparently sometimes it's still needed to use both.

Upvotes: 0

Related Questions