Results 1 to 5 of 5

Thread: Disable "text-select" cursor

  1. #1
    Join Date
    May 2005
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool Disable "text-select" cursor

    I need to disable the "text-select" cursor which appears when moving the cursor over text [that looks like an 'I']. I just need it to remain as it is, the normal "pointer" cursor.

    I couldn't find this script in Dynamic Drive. The "no-text-select" script does not work for that.

    Thanks..

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That is just a cursor, the cursor can be changed using css style. Do you want to disable text selecting or just make the cursor remain as the familiar arrow it ordinarily is when not over text? You can do both but, the cursor is done with style, the no select text with a script. There are a number of ways to change the cursor using style. The approach I would take is to create a class definition:
    Code:
    <style type="text/css">
    
    .noIbar {
    cursor:default;
    }
    
    </style>
    Put the above in the head of your document and wherever you want the cursor to be the arrow when it normally would be the ibar select text cursor, add the class definition to the containing element:
    HTML Code:
    <p class="noIbar">This text will have an arrow cursor</p>
    or:
    HTML Code:
    <div class="noIbar">More text with an arrow cursor</div>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jul 2005
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Why bother :P. Is it that big of a deal if it's a text cursor? None the less Js already answered your question . He's on the ball.

  4. #4
    Join Date
    May 2005
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks a lot, John

    @ Willdawg,
    It's just a cosmetic motive

  5. #5
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    Some other cursors:

    cursor:default;
    cursor:crosshair;
    cursor:move;
    cursor:hand;

    those are the basic cursors.

    -magicyte

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •