external CSS: relative addressing

liunx

Guest
Coherent Dog is growing; I have a page I need to post quickly, but my /www directory is already too full, and I need to make a subdirectory.

I'm worse than weak at relative addressing. I've consolidated my pages so every single one now uses the same external style sheet, which is located in my /www directory.

Now I'm about to make a subdirectory called med, in which I'll put numbers of pages.

files I will need are:

SSIs

which are currently in /www/include
(a whole bunch; text files that specify banner and footer images, and navigation files, both horizontal and vertical-down-the-right)

CSS

/www
(codog.css)

IMAGES

I don't think I have to worry about this one, unless I need to edit the text files in the /include subdirectory. For instance, here's one of those files:


<div id="masthead">
<a href=http://www.webdeveloper.com/forum/archive/index.php/"index.htm"><img alt="Where Eagles and Herons Watch Dogs (32KB)" title="Where Eagles and Herons Watch Dogs" src="images/logos/codogacc.jpg" /></a>
</div>


But I foresee a difficulty there, too; that is, in the code example, the images directory specified is /www/images/logos

however, my .html directory will be /www/meds

So - am I asking this question right? I'm completely dyslexic about this sort of thing; have no idea how to specify the URLs while sticking to relative addressing, which I most urgently want to do!

Is it clear what I'm asking?

Thanks again, in advance again, for your help!

Tue, 14 Jun 2005 09:55:45<a href=http://www.webdeveloper.com/forum/archive/index.php/"index.htm"><img alt=" ... " title=" ... " src="images/logos/codogacc.jpg" /></a>

If you are in the med directory (<!-- m --><a class="postlink" href="http://www.your_sute.org/med/">http://www.your_sute.org/med/</a><!-- m -->)
then

index.html will mean
<!-- m --><a class="postlink" href="http://www.your_sute.org/med/index.html">http://www.your_sute.org/med/index.html</a><!-- m -->

and

images/logos/codogacc.jpg
<!-- m --><a class="postlink" href="http://www.your_sute.org/med/images/logos/codogacc.jpg">http://www.your_sute.org/med/images/logos/codogacc.jpg</a><!-- m -->

Personally I always find it better to use absolute links.Hmm. I've found relative addressing very useful many times, but maybe using so much SSI changes that.

I'll consider very carefully what you're suggesting. Having moved to using a lot of SSI, I can no longer check every detail of my pages here at home on my machine anyway; that was part of the point of sticking to relative addressing. So maybe I should move to absolute.

Doing so would certainly be less confusing to me!

I blanch at the thought of having to edit pages already up - but maybe I wouldn't have to do that. I have about 70 pages up - eeek!

Thanks a million for your help and suggestions, Scleppel.

Anybody have a different opinion? (Obvious fishing here, haha!) - but seriously, I really do appreciate your help, and I might use it!

Tue, 14 Jun 2005 10:48:51You don't have to make every link an absolute link, just links like 'home' that will always be <!-- m --><a class="postlink" href="http://your_site.org/index.html">http://your_site.org/index.html</a><!-- m --> or if you know your images will always be in the <!-- m --><a class="postlink" href="http://your_site.org/images/">http://your_site.org/images/</a><!-- m --> directory, then it's probably easier to use an absolute link for your images. This could cause a problem while testing though, but you could always make a folder C:\images\ ...Hi Scleppel,

You don't have to make every link an absolute link, just links like 'home' that will always be <!-- m --><a class="postlink" href="http://your_site.org/index.html">http://your_site.org/index.html</a><!-- m --> or if you know your images will always be in the <!-- m --><a class="postlink" href="http://your_site.org/images/">http://your_site.org/images/</a><!-- m --> directory, then it's probably easier to use an absolute link for your images. This could cause a problem while testing though, but you could always make a folder C:\images\ ...

Sorry a bit late replying - nursing one dog through recovery from knee surgery while the other and the cat attend (doesn't make things easier, haha - but actually all are being very good).

I think I follow you pretty well - understood what you're saying. I need to think a lot, because I have a funny feeling I ought to bite the bullet, and make a complete change of directory structure on my site.

[GROAN!]

Of course, I've bitten the bullet before - at least twice - but now it's not 30 or 50 pages, but around 70 of them. YIkes! Using a lot of SSI, though, helps simplify matters for biting bullets.

Maybe I'll use a combination of absolute and relative addressing, as you suggest. Thanks a lot! I really appreciate your help!

Wed, 15 Jun 2005 08:13:43
 
Back
Top