SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Evangelist N9ne's Avatar
    Join Date
    Aug 2002
    Location
    UK
    Posts
    596
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how do you make it so when you hover over text, the cursor stays as an arrow?

    example: www.vbulletin.com , hover over text and the cursor stays the same, how can I do this?

  2. #2
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    Svj
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    a:hover{cursor: default;}

  3. #3
    SitePoint Evangelist N9ne's Avatar
    Join Date
    Aug 2002
    Location
    UK
    Posts
    596
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's for links, I want it for all text...

    I'd prefer it to change to a hand when you hover over links but it's just the normal text that I don't want the cursor to change over...

  4. #4
    SitePoint Wizard iTec's Avatar
    Join Date
    May 2001
    Location
    Sydney, Australia
    Posts
    2,243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    body {cursor: default;}

  5. #5
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'll need to specify the cursor for the a tag also, otherwise you will get the default cursor on links too.

    Code:
    body {
    cursor:default;
    }
    
    
    a {
    cursor:pointer;
    }
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  6. #6
    SitePoint Evangelist N9ne's Avatar
    Join Date
    Aug 2002
    Location
    UK
    Posts
    596
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So what would be the exact code to put in my <head> tag

  7. #7
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <head>
    <style type="text/css">
    <!--
    body { cursor: default; }
    -->
    </style>
    </head>
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  8. #8
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or to be 'exact'... ;)

    Code:
    <style type="text/css">
    <!--
    body { cursor:default; }
    a { cursor:pointer; }
    -->
    </style>
    Don't forget the need to specify the cursor for the a tag (links).

    The format/layout of the css between the <style></style> tags can be done either as shown above or as I did in my first post here. Both are equally valid.
    It's just a matter of whichever way you are most comfortable with.


    If you have many pages you will be better off putting this CSS into a .css file of its own and linking to it in the head of each page.
    In that case, create a text file containing everything between the <!-- and --> and save it with the suffix .css (e.g. styles.css)

    In the head of each page you wish to use it on add just...

    Code:
    <link rel="stylesheet" type="text/css" href="styles.css">
    That way you can easily make sitewide changes to the css by simply altering the .css file rather than changing every html page.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  9. #9
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Bill Posters
    Or to be 'exact'... ;)

    Code:
    <style type="text/css">
    <!--
    body { cursor:default; }
    a { cursor:pointer; }
    -->
    </style>
    Don't forget the need to specify the cursor for the a tag (links).
    Actually, you don't need to specify the cursor for the "a" tag. It will continue to use the hand unless "default" is specified as it's cursor. :)
    Last edited by Adam P.; Aug 25, 2002 at 06:14.
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  10. #10
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by swimm5001


    N9ne said "I'd prefer it to change to a hand when you hover over links but it's just the normal text that I don't want the cursor to change over." So he doesn't need to add the attributes to the a tag.
    That's exactly why s/he needs to 'reinstate' the hand/pointer cursor for links.

    If s/he wants them to behave normally (which s/he does) then the a tag (link) cursor needs to be specified, otherwise the body tag css will override the normal cursor behaviour of links and give them just the default/arrow cursor.

    Try it with and without the a tag css and you'll see what I mean

    <edit>
    Ahaa, IE Mac needs to have it (re)specified.
    Just tested in Opera 5 Mac and Moz 1.0 Mac and they both use the pointer cursor without needing to specify the a tag css.

    Can I assume that IE5 and IE6 for PC still use the pointer?

    Still, I guess that it still might be a good idea to specify it just to support those browsers that may need 'reminding'
    And it won't do any harm to include it.
    </edit>
    Last edited by Bill Posters; Aug 25, 2002 at 06:31.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  11. #11
    SitePoint Evangelist N9ne's Avatar
    Join Date
    Aug 2002
    Location
    UK
    Posts
    596
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks people Personally I prefer not having the text cursor thing


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
  •