View Full Version : Cursor Help


darckasasin
04-21-2004, 12:26 PM
I'm finally trying CSS and need help. I tried using CSS to change the cusor into a hand. Did I miss something or do something wrong?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<script language="JavaScript" type="text/javascript"> <!--
// No rightclick script v.2.5
// (c) 1998 barts1000
// barts1000@aol.com
// This script and others available free at http://www.lissaexplains.com


var message="Hey! Buzz off, copycat!\nThe images are Alex Fuentes originals!\nBut I'll be happy to make a banner for you."; // Message for the alert box

// Don't edit below!

function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// --> </script>
<title>The New Alex Fuentes</title>
<meta name="All you need to know about average genius Alex Fuentes">
<meta name="Alex, penguins, games">
</head>
<body bgcolor="#000000">
<style type="text/css">
cursor: value; hand}
</style>
<br>
<br>
<br>
<br>
<br><div align="center"><img src="images/welcome.bmp" alt="">
<br>
<br>
<br>
<br>
<br>
<br><a href="welcome.html" border="0"><img src="images/enter.bmp" alt=""></a>
</body>
</html>

pcsagewiz
04-21-2004, 02:11 PM
see if this helps:

<style type="text/css">
{
cursor: value; hand
}
</style>

bourdelson
04-21-2004, 09:04 PM
Actually, it should be:

<style type="text/css">
body{
cursor: hand;}
</style>

and it goes between the <head> tags of your HTML. :)

Calidris
04-21-2004, 10:58 PM
The "hand" cursor is actually incorrect. Imagine someone who has set up their cursors on the computer so that when they hover over a link the cursor becomes a tree... would it be right to call that the "hand" cursor? No.... that's just stupid Microsoft for you.

The correct name for the cursor you want - which works on all cursor-supporting browsers - is "pointer". CSS like this:
body { cursor: pointer; }

Using this cursor (or hand) for the body can be VERY confusing for some people. Cursor changes should be avoided unless the change is functional. E.g. use the "help" cursor for a tooltip maybe.

darckasasin
04-22-2004, 01:52 AM
Actually, it should be:

<style type="text/css">
body{
cursor: hand;}
</style>

and it goes between the <head> tags of your HTML. :)

Yay, it works. Thanks bourdelson!

EDIT: K, you can close this now. :)