Hello;
I would like to use MY OWN CURSORS with your "Fancy Cursor Script".
Is that possible? Can it be re-written for that?
Thank-You for your time.![]()
Hello;
I would like to use MY OWN CURSORS with your "Fancy Cursor Script".
Is that possible? Can it be re-written for that?
Thank-You for your time.![]()
gdw,
Using the example code given:
<span style="cursor:\pointer;cursor:hand">This span has a "hand" cursor</span>
(I had to put a \ in the above example or the : and the p would make a weird smiley face)
you can use:
<span style="cursor:url(path/some.cur),hand,pointer">This span has a custom cursor in IE5+ and a "hand" cursor in other browsers</span>
Where path is the absolute or relative path to the cursor file you have created using a program that makes valid cursor files (like microangelo). Only works for IE5+ I believe. I can only guarantee it working in IE6+.
Last edited by jscheuer1; 03-06-2005 at 05:06 AM. Reason: saw error
Thank-You, I greatly appreciate your help.
One last question, if I may...
Is it:
"cursor:url(path/some.cur),hand,pointer" (with a comma)
or...
"cursor:url(path/some.cur);hand,pointer" (with a semi-colon)?
Last edited by gdw; 03-06-2005 at 09:21 AM.
The way I wrote it, it is a comma. That gives browsers a choice. If they can't do the first thing, they go to the thing after the comma and so on until they find an attribute they support. It is the same as with the font-family style declaration. On the other hand, you can write it with semicolons but not just substituting them for the commas. With semicolons, each declaration must be complete.
with comas:
style="cursor:url('path/some.cur'),hand,pointer,text,default;"
notice I single quoted the path/some.cur this time, generally that is optional but, good form.
with semicolons:
style="cursor:url('path/some.cur');cursor:hand;cursor:\pointer;"
If you try the above, take out the '\'
however, with semicolons, even browsers that support the url declaration may just go with one of the later declarations, so comas are better in this case. Now, I've got a question for you. Why not just try them both and see what happens? By the time you read this, you probably have. Anyways, only higher versions of IE support this url cursor declaration. Good luck with it!
That is invalid CSS. Multiple url values may be provided and separated by commas, but only one standard type is allowed in any single declaration.Originally Posted by jscheuer1
Not particularly. There is no compulsion to quote values, nor are there any situations when quotes are required. They are optional: simple as that.notice I single quoted the path/some.cur this time, generally that is optional but, good form.
That too, is invalid CSS. The first declaration is invalid as a standard value is always required. The second is invalid as there is no defined hand cursor value. The third is invalid as \p isn't a valid escape code.cursor:url('path/some.cur');cursor:hand;cursor:\pointer;
I understand why the hand value is present, but that doesn't make it any more correct.
Mike
Before you go confusing others, particularly the poor fellow originally asking for help here, get your facts straight (see below the quoted section).
As I understand it, you are simply wrong. If you do not believe me, go to the W3schools:Originally Posted by mwinter
http://www.w3schools.com/css/pr_class_cursor.asp
,home of the W3C: Web Standards. Where are you getting your information from?
Two reasons I can figure to quote the filename are:
1. To adhere to strict standards if your page uses a doctype declaration that requires same.
2. To prevent some browsers from misunderstanding where the filename (and path if included) begin and end in the declaration.
About the \p. I told the fellow to take out the \. I used it to prevent this:
from appearing in the message at that point. Know a better way?
As for the rest of your comments, go to 'school'![]()
Indeed I was mistaken:Originally Posted by jscheuer1
is valid. I didn't realise the sequence <space> -> ~ (tilde) listed in the escape grammar rule spanned all alphanumeric symbols as well as punctuation (oh no! I haven't memorised ASCII!Code:cursor:\pointer;). Other than that, my post was factually accurate.
Then either you don't understand, or your information is wrong...As I understand it, you are simply wrong.
...and it could be the latter.[...] W3schools:
However, nothing written in that document contradicts what I stated. In fact, that document doesn't say much of anything.
The home of the W3C is http://www.w3.org/. W3Schools has absolutely no affiliation with the Consortium. They are just a tutorial site like hundreds of others.home of the W3C: Web Standards.
The W3C's published recommendations. There is not a more authoritative source.Where are you getting your information from?
The DOCTYPE for a document has no bearing on the content of a style sheet. In modern browsers, the DOCTYPE modifies rendering behaviour, nothing more. The DOCTYPE is also required for validation. However, it does not change the fundamentals of style sheet parsing.Two reasons I can figure to quote the filename are:
1. To adhere to strict standards if your page uses a doctype declaration that requires same.
That is what the functional notation, url() does. You seem to be applying HTML outside of its domain.2. To prevent some browsers from misunderstanding where the filename (and path if included) begin and end in the declaration.
Yes, two. Either disable smilies using the option below the post controls, or place a space between the two characters.About the \p. I told the fellow to take out the \. I used it to prevent this:
from appearing in the message at that point. Know a better way?
Might I suggest the same to you, though perhaps the phrase "go to spec." is more appropriate.As for the rest of your comments, go to 'school'![]()
If you really want me to, I'll walk you through the specification, pointing out where I obtained the facts. Alternatively, you could just accept that I'm right. Sorry to sound arrogant, but you did tell me to "get [my] facts straight". I think I deserve the right to return the remark in kind.
Mike
Last edited by mwinter; 03-07-2005 at 11:52 PM. Reason: Rephrasing the last paragraph.
Don't want to get into an argument over this, I'll just mention one error in your post:
The same style declaration (for example: assuming pixels without stating them) will work in quirks mode but not with a strict doctype. Best way to code though is not to argue over little things but, to use what works.
Thanks for the tip on the smileys.
P.S. Just checked about the school. I would debate that they are just like any other help site however, you are correct, not affiliated directly with W3.org which I just saw supports my use of the comma in the cursor declaration as well.
Last edited by jscheuer1; 03-08-2005 at 05:31 AM. Reason: add info
The difference between quirks and standards mode is the deliberate use of browser bugs (or the bugs themselves in still-broken user agents). It is those bugs which result in different parsing behaviour, not the DOCTYPE.Originally Posted by jscheuer1
In what way? They have more material than most, but so what? My point was that they are not an authority on HTML, nor any other Web technology.I would debate that they are just like any other help site
Mind quoting or linking to where you see this "support"?I just saw [the W3C] supports my use of the comma in the cursor declaration as well.
From the CSS 2 Recommendation (repeated verbatim in CSS 2.1):
Square brackets are grouping operators and pipes/bars (|) separate alternatives. Double bars (||) separate options. Groups and keywords may be followed by quantifiers. An asterisk (*) means zero-or-more, whilst a plus (+) means one-or-more. A question mark (?) designates an optional value (that is, zero-or-one). The last qualifier is a pair of numbers surrounded by braces: {n,m}. n specifies the minimum number of occurances for the value, and m specifies the maximum.Code:'cursor' Value: [ [<uri> ,]* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help ] ] | inherit
Now that I've provided a quick primer, you should be able to read that URI values are optional, though many can be specified if desired, separated by commas. However, note that the way the syntax is written, the last URI value will be followed by a comma. Also, notice that the list of keywords is not optional. That supports my statement that URI values cannot be used by themselves and must be accompanied by a generic type. Notice that the keywords are alternatives, not options, that only one can be included (no quantifier), and there are no specified separators. Your use of commas is not supported. Finally, there is no hand keyword (though I'm sure we all knew that).
The specifications are normative. Other documents are to be considered informative. Unless a correction or alteration is provided in the errata for a Recommendation[1] (and there isn't in this case), or the Recommendation status is changed, the content of a Recommendation stands.
Mike
[1] The W3C word for "standard".
This is from:
http://www.w3.org/TR/CSS21/ui.html
:link,:visited { cursor: url(example.svg#linkcursor), url(hyper.cur), pointer }
Don't be such a nit picker. I am through with this thread.
P.S. Since I am through with this thread, I'm adding that this declaration:
div {cursor:url('blank.cur'),pointer,crosshair,default;}
validates on the w3C CSS validator. So would the one with 'hand' in it, if the validator understood, as I know you do, the reason for including 'hand' in the declaration. To be fair to your obvious nit picking nature, 'crosshair' and 'default' were seen as unnecessary, but not invalid. However, something is needed for browsers that do not support either the url or the pointer, unless you want the default and the possibility of an unexpected result that could render your page as garbage. BTW, the quotes around 'blank.cur' were not stripped out by the validator. This would indicate that they might have some purpose. Now, how has any of this helped the fellow with the original question? If he follows my suggestions from before you became involved, he will have fine in line style that works.
Last edited by jscheuer1; 03-09-2005 at 01:32 AM. Reason: add info
Bookmarks