Home About Us Add URL Add Articles  
namearticle.com namearticle.com namearticle.com
Our Industries

 

  Home –› Software & Networking –› Web Design & Development
   
 

CSS Cursors - How To Use Them

   

One thing that CSS allows us to use for screen presentation are alternate cursors. This is not the idea of downloading or forcing a download of a cursor, as was done in the past (though that is possible as well), but instead, we use several built in concept cursors.

Each of these cursors you can use to enhance useability of your website. For instance, if you want to define that something has context help, you could use the help cursor.

The CSS2 standard gives us 17 options for cursors, plus the option to use an external cursor from a URI. For two of the cursor options, there could have been slightly better phrasing, because it is a touch confusing for some people to remember. Two of the options are auto and default. Now, auto is actually the default value if you don't explicitly set a cursor to be applied. To the W3C, I imagine this wasn't a concern because they use the wording 'initial' value, instead of 'default' value. Unfortunately, in practice, most people tend to say 'default' value, instead of 'initial.' So, just keep in mind that the 'default' value for a cursor is actually 'auto' and not 'default'.

This should help it make a bit more sense:

  1. auto - Initial value. Lets the browser choose.
  2. default - Displays the basic cursor (usually an arrow).
  3. crosshair - A '+' shaped cursor.
  4. pointer - A pointer (usally displayed for links).
  5. move - Indicates a moveable element (often a 4-way arrow)
  6. text - Text can be selected. (often an I-beam)
  7. wait - Asks the user to wait (often an hourglass).
  8. help - Indicates help is available (often a question mark).
  9. progress - Similar to wait but shows that a process is working.
  10. e-resize - Indicates a resizeable element. Double-arrows display direction to size.
  11. ne-resize - Same as e-resize.
  12. nw-resize - Same as e-resize.
  13. n-resize - Same as e-resize.
  14. se-resize - Same as e-resize.
  15. sw-resize - Same as e-resize.
  16. s-resize - Same as e-resize.
  17. w-resize - Same as e-resize.

I mentioned that there is also the option to use the cursor for an call to a remote cursor. So, let's say that you have a cursor you would like the browser to use, and you have it stored at a specific location. You could do the following:

<span style="cursor: url(preferredcursor.cur)">Text</span>

Now, the problem is that not all browsers may be able to load or use that cursor. Let me give an example of one that browsers might have a hard time viewing, and the way you can still set an alternative. In CSS:

acroynm { cursor: url(1.svg), url(2.cur), help }

The first one (1.svg) is the preferred cursor and if the browser can handle loading and displaying and SVG file, it will do that one. If not, it moves to the second, and tries to load the 2.cur file as the cursor. If it cannot, it will instead display the built-in help cursor.

That is the nice aspect of CSS cursors - they degrade gracefully. If a browser cannot support them, they don't show, and it does not cause display problems. So, feel free to use the CSS cursors. Not all will show for everyone, but due to the smooth degradation for browsers without support - it is a perfect use of CSS.

Author: Nicole Hernandez
 
Author Bio:
Nicole Hernandez is a noted author. Nicole likes to create articles about this area.
This article can be searched using: web site development, web design & development, website development tampa
 
 
 

Related Articles

 
High Earnings for Low Traffic Blog
 
An Explanation of Medical Billing Software Prices
 
Affiliate Marketing: Turn Your Blog Into Cash
 
How To Boost Your Traffic and Your Profits With Content
 
Where Can I Download Linux?
 
Computer Games
 
How Quantum Computers Will Work
 
Facts and Suggestions Regarding Marketing Software
 
Stop emailing articles to your list!
 
The History and Origins of Our PC Computer Keyboards
 
 
 
 

Banner Ads For The Uninitiated

If you're going to advertise your website on other people's websites, at some point you are going to ... - Tim Priebe
 

Do Computer Repair Classes Make Sense For You?

There is a lot to know if you plan on repairing computers for a living. Even if you simply plan on m ... - Joe Duchesne
 

What a Billionaire Balloonist Taught Me About Internet Marketing

Yes, believe it or not, after 10 years? of mastering Internet marketing I can now safely say that be ... - Michael Cheney
 
 

Sony Playstations - Some Interesting Facts

A play station is a type of video game machine which was first produced by Sony in the 1990??s. Sinc ... - Barney Garcia
 

Website Design, Article Submissions, SEO Techniques: All Part of Internet Marketing Traffic Pie

There is a critical element of thought that many Internet Marketers are missing about SEO techniques ... - Stephanie Mulac
 

How To Get Targeted Traffic To Your Website!

Everyone who has a website knows that to have sales you must have traffic, but not just any traffic ... - David Riewe
 

Shared Or Dedicated Web Hosting? What Does Your Business Need

There is nothing more frustrating as a webmaster then waking up in the morning, firing up your brows ... - Bedrich Omacka
 

Choose the Wrong Hosting Company and You Are Doomed

Lynn VanDyke targets what it takes to succeed with online businesses. The first step is choosing an ... - Lynn VanDyke