July 28, 2001

It's all relative...

Some what related to the previous post, you have to be aware of your links and how everything fits together. What am I talking about, you ask?

Well, anchor links can be either relative or absolute. Let's say all your web pages and images are in one big happy directory (ie. folder, sub-directory - ya know what I mean). You can link to them, relative to your present position (ok, the location of the file from where you are linking): src="./filename.jpg" - or just src="filename.jpg" - ./ being the same directory you're in. Say the file is in a sub-directory under your current directory. Then use src="./subdirectoryname/filename.jpg" - or of course, src="subdirectoryname/filename.jpg"

What if the file is in a directory "above" your current directory? Still possible, just use src="../filename.jpg" - where then ../ is referering to the upwards directory.

Ok, what if the file is no where in your directory tree? Oh my gosh, you're out of luck! No, just kidding. That's where absolute links come into play.

For example, you want to display a picture that is located on a friends web site. You would then use the full URL in your anchor: src="http://anyothersite.com/images/filename.jpg" - depending on the location of location of the file at the other server, of course.

Ok, so I'm sure I made that as clear as mud.