How to get the cursor to change to the hand when hovering a button tag
see:
https://developer.mozilla.org/en-US/docs/Web/CSS/cursor
so you need to add: cursor:pointer;
In your case use:
#more {
background:none;
border:none;
color:#FFF;
font-family:Verdana, Geneva, sans-serif;
cursor:pointer;
}
This will apply the curser to the element with the ID "more" (can be only used once). So in your HTML use
<input type="button" id="more" />
If you want to apply this to more than one button then you have more than one possibility:
using CLASS
.more {
background:none;
border:none;
color:#FFF;
font-family:Verdana, Geneva, sans-serif;
cursor:pointer;
}
and in your HTML use
<input type="button" class="more" value="first" />
<input type="button" class="more" value="second" />
or apply to a html context:
input[type=button] {
background:none;
border:none;
color:#FFF;
font-family:Verdana, Geneva, sans-serif;
cursor:pointer;
}
and in your HTML use
<input type="button" value="first" />
<input type="button" value="second" />
change cursor to finger pointer
<a class="menu_links" onclick="displayData(11,1,0,'A')" onmouseover="" style="cursor: pointer;"> A </a>
It's css.
Or in a style sheet:
a.menu_links { cursor: pointer; }
How to change the cursor into a hand when a user hovers over a list item?
In light of the passage of time, as people have mentioned, you can now safely just use:
li { cursor: pointer; }
Why does button not have a pointer cursor on hover by default?
Please take a look at these answered similar questions
Why don't HTML elements have a CSS cursor pointer by default?
Default cursor on mouse over of a button is not a hand pointer
Change cursor to hand when mouse goes over a row in table
You can do this with CSS actually.
.sortable tr {
cursor: pointer;
}
How to change cursor type on hover in css
do you mean this.
#one:hover {
cursor: pointer;
}
button:hover {
cursor: default;
}
<div id="one">
Hover Me!
<button>Hover Me!</button>
</div>
Change the mouse cursor on mouse over to anchor-like style
Assuming your div
has an id="myDiv"
, add the following to your CSS. The cursor: pointer
specifies that the cursor should be the same hand icon that is use for anchors (hyperlinks):
CSS to Add
#myDiv
{
cursor: pointer;
}
You can simply add the cursor style to your div
's HTML like this:
<div style="cursor: pointer">
</div>
EDIT:
If you are determined to use jQuery for this, then add the following line to your $(document).ready()
or body onload
: (replace myClass
with whatever class all of your div
s share)
$('.myClass').css('cursor', 'pointer');
Related Topics
Width: 100% with Position: Absolute
Google Font API Uses Browser Detection. How to Get All Font Variations for Font-Face
When Using CSS Scale in Firefox, Element Keeps Original Position
CSS: Styling The Content of Before Pseudo Element on a List
Sorting CSS Properties into an Arbitrary Order
Different Levels of CSS and The Priority Over Each Other
Media Queries - CSS Only for iPhone Landscape
Twitter Bootstrap - Position Issue with Row-Fluid
Image Paths in CSS to Support Cdn
New Bulletproof @Font-Face Syntax Using Data Uris in Compass
Considerations for CSS3 Transition Performance
Phantomjs Doesn't Render Footers with a Custom Styles
Pace.Js "Hide Everything But Pace Until The Page Has Fully Loaded" Local Copy
Change Default Font in Semantic-Ui with @Font-Face
Center Two Divs in The Middle of a Wrapper
Printing a Bootstrap Page from Google Chrome Cause (Sometimes) Truncation Height of The Printed Page