Log in

View Full Version : Firefox cursors



???
08-20-2007, 05:14 PM
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?

jscheuer1
08-20-2007, 05:19 PM
<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'.

???
08-20-2007, 05:24 PM
Ok, thanks. But how would you do that in Javascript?

document.getElementsByTagName ("html") [0].style
?

jscheuer1
08-20-2007, 05:31 PM
Something like:


<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>