24

I have an HTML table and I put a double click on the rows. The table is read only except for some <input> fields.

How can I make it so that the cursor does not change to an I bar when I hover over the text that's not an <input> field?

I received some answers but they just point to links. Can someone give me an example in a fiddle ?

  • possible duplicate of [How can I make the cursor a hand when a user hovers over a list item?](http://stackoverflow.com/questions/3087975/how-can-i-make-the-cursor-a-hand-when-a-user-hovers-over-a-list-item) – Ast Derek Jan 08 '14 at 06:33
  • 1
    You can restrict user to select the text by `user-select: none;`. Add vendor prefix for browser compatibility. Although user can select the text by other methods. – Kunj Jan 08 '14 at 07:10

4 Answers4

22

You can use a CSS property called cursor to specify what your cursor will turn into when you scroll over the text. You can see some of the examples here.

And here is a default cursor on a table example. FIDDLE.

MitulP91
  • 1,279
  • 2
  • 12
  • 24
7
.your-block {
  cursor: default;
}
Félix Paradis
  • 5,165
  • 6
  • 40
  • 49
ame
  • 773
  • 9
  • 21
4

set cursor property for the field you want to be some thing like pointer,waiting etc

http://www.w3schools.com/cssref/pr_class_cursor.asp

faisalbhagat
  • 2,142
  • 24
  • 27
  • If I set that for the table then how can I make it different for the input ? –  Jan 08 '14 at 06:47
  • 2
    table must be having and inside the their will be some component may be a div may be an input field. you can set cursor for them separately dont set it for table set it for child components – faisalbhagat Jan 08 '14 at 07:00
-1

use this css:

table.className td input{
   cursor: none; /* or the one which you would like to have */
}
Mr. Alien
  • 153,751
  • 34
  • 298
  • 278
uihelp
  • 198
  • 2
  • 7