Results 1 to 4 of 4

Thread: Firefox cursors

  1. #1
    Join Date
    May 2006
    Location
    Alaska
    Posts
    163
    Thanks
    5
    Thanked 2 Times in 2 Posts

    Default Firefox cursors

    I don't know how Javascriptie this question is, but in firefox, when I set a cursor on the body, it only changes when you have your mouse over content in the body, not a blank space. I tried putting an image over, but then you can't select text. How might I do this?

  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

    Code:
    <style type="text/css">
    html, html * {
    cursor:help!important;
    }
    html {
    height:100&#37;;
    }
    </style>
    If you want other styles to be able to change the cursor in certain cases, don't use '!important'.
    - John
    ________________________

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

  3. #3
    Join Date
    May 2006
    Location
    Alaska
    Posts
    163
    Thanks
    5
    Thanked 2 Times in 2 Posts

    Default

    Ok, thanks. But how would you do that in Javascript?
    Code:
    document.getElementsByTagName ("html") [0].style
    ?

  4. #4
    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

    Something like:

    Code:
    <script type="text/javascript">
    function curses (){
    var els=document.getElementsByTagName('*'), htm=document.getElementsByTagName('html')[0];
    for (var i = 0; i < els.length; i++)
    els[i].style.cursor='help!important';
    htm.style.height='100&#37;';
    }
    onload=curses;
    </script>
    - John
    ________________________

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

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
  •