Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3
This is the forum to discuss the Wrox book Beginning CSS: Cascading Style Sheets for Web Design by Richard York; ISBN: 9780764576423
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 25th, 2006, 06:44 AM
Friend of Wrox
 
Join Date: Apr 2005
Location: Fort Walton Beach, FL, USA.
Posts: 190
Thanks: 0
Thanked 0 Times in 0 Posts
Default Unable to set image or cursor property, Ch 12.

Help please: Having 2 problems with Chapter 12: url property and cursor property.

I am using plain vanilla IE 6.0.2900.2180. (Win XP, SP2). See code below.

Anyone able to set the list-style-image url('XXXX');
property, with above configuration, in Ch 12?
For XXXX, I tried: 'download.gif', '~\images\banana.ani'

Anyone able to set the cursor property as specified in the
one-line greyed out area on page 353 to work?

Also cannot get any .ani or .cur to work as per the sentence (p. 353)
below:
 "IE 6 supports only windows native cursor formats: .cur(a
static cursor image) and .ani (an animated cursor image)."

Anyone able to do this using only IE6? Please help.

Code:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">
    <link rel="Stylesheet" href="StyleSheet.css" type="text/css" media="screen" />
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1">
    <div>
        Test text
    </div>
    </form>
</body>
</html>

Style sheet:

div {cursor: url('~\images\banana.ani,'), url('pen_i.cur');
    border: thin solid black; width: 100px; height: 100px; }

Thanks.
VV



  #2 (permalink)  
Old April 25th, 2006, 07:01 AM
Friend of Wrox
 
Join Date: Apr 2005
Location: Fort Walton Beach, FL, USA.
Posts: 190
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I omitted mentioning that the cursor property itself works fine -- i.e.:
when you specify it as a cursor ~keyword~ (crosshair, move, wait, ...).
It's only when you want to use the url to point to some file that it
doesn't work (for me).
VV

  #3 (permalink)  
Old April 25th, 2006, 02:38 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

You have a few errors in the path you are specifying. Where are you getting the tilde? You're using backslashes instead of forward slashes. Also, you have a comma after the first file name.

Code:
div {
    cursor: url('/images/banana.ani');
    border: thin solid black;
    width: 100px;
    height: 100px;
}
Although it isn't spelled out as clearly as it could have been in the book, while IE does support custom cursors, I don't beleive it supports fallback cursors. I'm using a Mac at the moment, so I can't test it to be sure.

http://msdn.microsoft.com/workshop/a...ies/cursor.asp



Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html
  #4 (permalink)  
Old April 26th, 2006, 10:20 AM
Friend of Wrox
 
Join Date: Apr 2005
Location: Fort Walton Beach, FL, USA.
Posts: 190
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Rich:
Thanks again. Problem solved.

The tilde comes from the provision for a server to consider a file 'server local',
if the file name is preceeded with a tilde.

In my trials and tribulations to get this working, it occurred to me that my
development computer is acting as my own server. Thus, inserting a tilde seemed
like a good thing to try. (Now seen as not necessary of course.)

Yup, forward slashes, backward slashes, always giving me a headache.
I did try both, but the mix of other errors precluded seeing any improvement.

The comma was because at one point I had several files specified for the possibility
of a backwards search to find something -- anything, that would work. I simply forgot
to remove the comma when I documented the problem.

One thing tho:

Your suggestion as shown above still did not work. I had to remove the forward slash in
front of the folder name to get it to work. That is:

Doesn't Work: ...... cursor: url('/images/banana.ani');
Works: ....... cursor: url('images/banana.ani');

Perhaps this is due to a difference: Mac vs. PC or IE6 idiosyncracy.

VV




  #5 (permalink)  
Old April 26th, 2006, 10:27 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

> Your suggestion as shown above still did not work. I had to remove the forward slash in
> front of the folder name to get it to work. That is:

"/images/banana.ani" is an absolute path, the leading forward slash refers to the root directory.

So the full path would be "http://www.example.com/images/banana.ani", writing it as "/images/banana.ani" allows you to leave off the domain and yet refer to the root directory no matter where you are calling it from.

Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html
  #6 (permalink)  
Old April 26th, 2006, 10:49 AM
Friend of Wrox
 
Join Date: Apr 2005
Location: Fort Walton Beach, FL, USA.
Posts: 190
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Rich:
It won't work on my computer with the forward slash in front of the folder name.
Instead it displays the black disk default.
VV


 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chp.12 SqlDataSourceView 'owner' property studen77 BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 0 March 6th, 2007 02:58 PM
Word-unable to move cursor using mouse. jahid General .NET 0 February 6th, 2007 06:10 AM
"Unable to set the FormulaArray property..." rduncan1 Excel VBA 2 August 18th, 2006 01:33 PM
How to set cursor position in a textbox? zayasv VB.NET 2 April 29th, 2006 07:09 AM
Ch. 4 & Ch. 12 athena BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 July 23rd, 2004 10:54 AM



All times are GMT -4. The time now is 01:59 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.