Search code examples
htmlcssfirefoxcursor

Whole Page Clickable, Firefox


I have this piece of code in my style sheet to change the cursor to a pointer on one page, and it works well except on firefox, where it doesn't give you a "pointer" finger to let you know the page is clickable.

   html { 
    cursor:pointer;
    } 

The thing is, the normal method of putting an onclick event in the body tag isn't working. (shown below not working)

<body onclick="window.href.location=filename">
body text
</body>

How do I get a pointer finger on the whole page instead of the normal mouse cursor in firefox?


Solution

  • You'll have to fill your whole screen with the element.

    html { 
      cursor:pointer;
      width: 100%;
      height: 100%;
    }
    

    Check this JSFiddle that I put together for you.