Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the hand cursor not showing in anchor tag when hovered?

Tags:

html

I have this markup, a label wrapped in an anchor tag, but the problem is the cursor when you hover this doesn't change to the hand cursor,

<a href="#17">   <label class="autor">     <span class="by">       by      </span>     Erwin Lutzer   </label> </a> 

what am i doing wrong here?

can anyone plz help, thanks!!

like image 209
kastulo Avatar asked Jun 05 '13 16:06

kastulo


People also ask

How do I change my cursor to hand when hovering 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 you change the cursor into a hand when a user hovers over a list item?

How to make the cursor to hand when a user hovers over a list item using CSS? Use CSS property to create cursor to hand when user hovers over the list of items. First create list of items using HTML <ul> and <li> tag and then use CSS property :hover to cursor:grab; to make cursor to hand hover the list of items.

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 show the cursor on a link?

The cursor property is used to specify the mouse cursor to be displayed when the mouse is pointed over an element. Using the 'pointer' value in this property will change the cursor to a 'pointer' indicating a link. This class can then be used on any link that does not have any href property to show the pointer.


2 Answers

The label is cancelling out the pointer, so make sure your CSS has cursor: pointer; for both the a and the label:

a, a label {     cursor: pointer; } 

Or better yet, remove the label! It's not valid to have a label inside an anchor.

like image 91
Derek Henderson Avatar answered Sep 18 '22 15:09

Derek Henderson


Not the answer for actual question, but solution to my own, similar problem:

hand cursor is not showing when hover link. The problem was in the lack of href attribute.

<a>Link</a>  <!-- regular cursor --> 

but

<a href="#">Link</a>  <!-- cursor pointer --> 
like image 20
yurin Avatar answered Sep 18 '22 15:09

yurin