Forum Moderators: open

Message Too Old, No Replies

Directory path for calling external files

         

keyplyr

6:06 am on Jan 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




I have always used:

<link rel="stylesheet" type="text/css" href="/css/stylesheet.css">

to call an external stylesheet, opting to not use complete path so those frontpagers who "rip" the webpage to their desktops will have an ugly version - but that's not my point ;)

Notice the preceeding slash in the href attribute.

A MAC IE/NN user reports that it's only when the preceeding slash is omitted that the CSS is displayed for him, example:

<link rel="stylesheet" type="text/css" href="css/stylesheet.css">

Which is correct? Or should I say, which is more correct for more users?

hakre

6:07 am on Jan 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



have you tried ./ on the mac?

keyplyr

6:17 am on Jan 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I haven't tried anything on a MAC. I have never even seen a MAC ;)

A couple non-webmaster type MAC users have been helpful in pointing out some compatability issues for me. They are not code savy enough to aid in the solution however.

hakre

4:09 pm on Jan 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i see. i think normally ./ works fine for staying in the same directory (and it's compliant), as ../ works fine for getting one level up towards root. / is root itself.

i haven't known that some proggies on mac can't take a path/down/there.html link at all. that's not what they should do.

keyplyr

9:10 pm on Jan 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks hakre. I think I am being overly concerned with one MAC user who, for some odd reason, is not getting the CSS. He wrote again and said that he was not even getting the CSS on a PC using IE. This I know is not accurate, so there may be ulterior motives at play here.

hakre

9:22 pm on Jan 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



thats really a pitty. i had that kind of an error longtimes ago and it was about not specifing the link to the stylesheet correctly. the type="" stuff has to be valid, too, or some browser wont take it. thats what i remember.

MWpro

4:02 am on Jan 10, 2003 (gmt 0)

10+ Year Member



I would just be safe and put that file in the main directory.