[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Changing the cursor for an entire site.

Posted on 2007-03-17
5
Medium Priority
?
194 Views
Last Modified: 2011-09-20
I would like to make the mouse pointer an image for the entire site. Not just mouse over, or onhover, but for the whole page. I'm supposing it would be put somewhere in the body tag.

What do you all think?
0
Comment
Question by:healthcomputing
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 5

Assisted Solution

by:PhilHow
PhilHow earned 80 total points
ID: 18741772
I stlesheet you put

* {cursor:url('yourimage.gif'}
0
 
LVL 15

Expert Comment

by:Daydreams
ID: 18746500
Hi healthcomputing,

The cursor would need to be in the form of a .cur or .ani file for IE6 and later (IE will not support other file types):

http://msdn2.microsoft.com/en-us/library/aa358795.aspx

From that page:
"Internet Explorer 6 and later. Cursor is defined by the author, using a custom Uniform Resource Identifier (URI), such as url('mycursor.cur'). Cursors of type .CUR and .ANI are the only supported cursor types."

Firefox, from version 1.5 and later, supports custom cursors:

http://developer.mozilla.org/en/docs/Using_URL_values_for_the_cursor_property

Ycan use BMP, JPG, CUR, GIF, etc. images. However, ANI is not supported. And even if you specify an animated GIF, the cursor will not be an animated cursor.

You can create custom cursors with the freeware iconArt: http://www.tucows.com/preview/293034

An example:

body {cursor: url(foo.cur), url(http://www.example.com/bar.gif), auto;}

This will first try loading foo.cur. If that file does not exist or is not valid for some other reason, bar.gif is tried, and if that can't be used either, auto will be used.

Various versions of various browsers may or may not support your custom cursor, so I would suggest not using it for anything important.
0
 
LVL 15

Accepted Solution

by:
Daydreams earned 120 total points
ID: 18746543
To be more concise, the style would be put in the head between the style tags thusly:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
 "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Custom cursors</title>
<style type="text/css">
body {cursor: url(foo.cur), url(http://www.example.com/bar.gif), auto;}
</style>
</head>
<body>
<div> Let's see if it works with your browser</div>
</body>
</html>
0
 

Author Comment

by:healthcomputing
ID: 18750354
Thanks to both of you, works like a charm.
0
 
LVL 15

Expert Comment

by:Daydreams
ID: 18750499
You're welcome healthcomputing:-)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question