Tips Station Asp.net Article Seo Articles
Tutorials Code Samples
›  Home
›  Mission
›  About us
›  Contact Us
›  Feedback
›  Terms & Condition
Asp Articles
IT Solutions
 
› ASP.NET

› Programming Tips

› Ajax

› Asp

› ADO.NET

› Databases

› SEO

› CSS And Designing

› Php

 
Most Viewed Articles
 
› Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

› Change theme dynamically without page refresh in ASP.NET

› Simple ASP Image Resize Function

› Install AJAX On Machines Running Visual Studio 2005

› ASP.Net Interview Questions And Their Answers

› Creating Pretty Popups Using AJAX

› Encode Url using ASP

› SQL Server Performance Counters

› .NET Data Access Performance Comparison

› UpdatePanel control in Asp.net Ajax

more...
 
 
Home> CSS And Designing
 
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 usability 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:

  • auto - Initial value. Lets the browser choose.
  • default - Displays the basic cursor (usually an arrow).
  • crosshair - A '+' shaped cursor.
  • pointer - A pointer (usually displayed for links).
  • move - Indicates a moveable element (often a 4-way arrow)
  • text - Text can be selected. (often an I-beam)
  • wait - Asks the user to wait (often an hourglass).
  • help - Indicates help is available (often a question mark).
  • progress - Similar to wait but shows that a process is working.
  • e-resize - Indicates a resizeable element. Double-arrows display direction to size.
  • ne-resize - Same as e-resize.
  • nw-resize - Same as e-resize.
  • n-resize - Same as e-resize.
  • se-resize - Same as e-resize.
  • sw-resize - Same as e-resize.
  • s-resize - Same as e-resize.
  • 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:

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

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 or Inline: 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.

This article has been taken from webdesign.org.

 
 
Vrp Technologies
 
Serversea Hosting
 
 
Latest Articles
 
› Sending SMS With PHP

› MySQL Join Tutorial

› Make An RSS Feed Using PHP

› Intro To Object: Option Variables

› Design An Online Chat Room With PHP And MySQL

› Create Tell A Friend Script With HTML & PHP

› Benchmark And Optimize PHP Script Speed

› What Kind of DBA Are You?

› SQL Server Performance Counters

› SQL Server Performance Tips

more...
 
Random Articles
 
› What Kind of DBA Are You?

› Cascading Stylesheets Advantages: 5 Reasons To Use CSS

› Browser Detection in ASP

› Design Considerations for Cross Page Post Backs in ASP.NET 2.0

› ADO.NET Data Classes

› MySQL Join Tutorial

› Displaying Data using ASP.NET 2.0 Repeater

› ASP.NET Simple File Upload Function

› Writing SEO Friendly URL using HttpHandlers in ASP.NET

› Storing and Retrieving Variables From Application Object - Asp

more...
 
Home Mission About us Contact us Feedback Terms Conditions
2008 © Copyright TipsStation. All rights reserved.