In article <9f33c3cc56....@6.abbeypress.net>, Jim Nagel
<nets...@abbeypress.co.uk> wrote:

[Snip]

>    2018.css   or ../2018.css   or ../../2018.css   etc

[Snip]

> Is there a way around this?  

[Snip]

I'm going to run away and hide after writing this:

1. Apart from files in the root, link them all with ../ and copy the css
file into every directory except the last in each branch using an obey
file which you keep in the root so you can update them if you make a
change to the master. Yeah, okay, those people screaming at the back,
maybe not if you have hundreds of directories, or

2. Re-organise - flatten - your site so that this isn't a problem, or 

3. Learn PHP. ;-)  This can read the current directory of the script/page
that's running and depending on the host it finds, sets either
"[nothing]" or "/[extra path]" as the value of a path which prefixes
"/Style.css?v=1"

A copy of the script:
http://timil.com/riscos/_to-do/css_slash.txt

Output of the script from my servers:
Distant:
http://timil.com/riscos/_to-do/css_slash.php
Local:
http://87.127.161.109/timil.com/riscos/_to-do/css_slash.php

You'll need to change the value of the first variable to the first eight
letters of the string returned as "current path" from your local server
and also the second variable, which is the name of the local folder
containing you web site, assuming it's in your server's root. You can see
timil.com is kept locally in a folder with the same name as its proper
site's URL.

Then replace your CSS sheet <link...> with everything between <head> and
</head> in the script on every page, and, oh, you'll also have to change
the name of your files from <name>/htm to <name>/php and make sure your
provider supports PHP and also that you're running a server with PHP
(such as WebJames+PHP). 

There. No changes to servers required.   ;-)

-- 

Tim Hill

timil.com : tjrh.eu : butterwick.eu : blue-bike.uk : youngtheatre.co.uk

Reply via email to