Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap Button - No Hand Cursor

I am developing an MVC6 project in Visual Studio 2015. I have just added Bootstrap 3.3.6 using Bower. On a very simple html page I have referenced the CSS in the header and Bootstrap at the bottom of the body as follows:

<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<script type="text/javascript" src="~/lib/bootstrap/dist/js/bootstrap.min.js"></script>

I defined a button as follows:

<button class="btn btn-primary">Hello</button>

When I debug the project (IIS, IE11) the button appears and is clearly styled by Bootstrap but there is no hand cursor.

If I use the browser to navigate to an example of a Bootstrap styled button, for example here: http://www.w3schools.com/bootstrap/bootstrap_buttons.asp, the hand cursor appears as I would expect. So it's not my browser at fault.

Can anyone suggest why I am not getting a hand cursor from a simple Bootstrap styled button please?

like image 921
TDC Avatar asked Jan 28 '17 19:01

TDC


People also ask

How do I get rid of my hand cursor?

You can change what cursor you want to use instead of the hand (pointer) cursor by changing default to another cursor code (see this MDN page for more information). Hope this helps. You would need to add a piece of CSS code, like this, to a <code>userContent. css</code> file: <pre><nowiki>a { cursor: default !

Why cursor pointer is 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 disabled in CSS?

Approach: First, select the element where cursor element need to hide. Add CSS style cursor:none to the a class. Add the class name (class name of CSS style cursor:none) to the particular element where cursor element to be hide.


2 Answers

You need to get rid of the button tags and just use anchor tags with bootstrap classes. For example:

instead of:

<button class="btn btn-primary">Hello </button>

write:

<a href="#" class="btn btn-primary">Hello </a>

This will make the HAND CURSOR appear when hovering over the btn bootstrap class

like image 190
Diego H. O'Hagan Avatar answered Oct 19 '22 12:10

Diego H. O'Hagan


Try add role='button' instead. I have had this problem even though the documentation on bootstrap says type='button' should do the work but mine didn't.

like image 40
Hieu Chu Avatar answered Oct 19 '22 10:10

Hieu Chu