PDA

View Full Version : Website design issues: Linking.


Tryxx
05-23-2006, 11:14 PM
Not just linking to another website, but I'm trying to get something working in Dreamweaver, and am a bit perplexed.

From the home page of the site (index.html), there are links to several other pages on the site, after some trial and error, these work fine. One of the links is to essays (essays.html). And from that page I can link to another one I made, which holds the essay. From the actual essay, I can't seem to link back to the home page or any of the other links.

Here's a crappy diagram of how the files are stored, as I don't have a domain yet to work off of, for relative linking.

Harddrive
To-V
Main folder
-index.html
-essays.html
-etc.html
Essays
-Essayone.html

I can't seem to link back to the main folder's .html links. I figured it would just look like: <a href="/index.html"> but it doesn't, and I frankly have no idea what I'm doing.

Any help would be great. And I don't think I described this too well... so if there are any questions, ask.

Ephemeral
05-23-2006, 11:54 PM
Try changing <a href="/index.html"> to the full directry of the page like <a href="www.*.com/index.html">. If you said that the main index.html is working, then this should work.

matt_h
05-24-2006, 03:41 AM
<a href="../index.html">

it is the dots that make the difference. i have just tested this on my site and it works.

Tryxx
05-24-2006, 10:24 AM
<a href="../index.html">

it is the dots that make the difference. i have just tested this on my site and it works.

I love you. That works. :D

Light Fantastic
05-24-2006, 10:58 AM
The reason the two dots work is because they indicate a directory transversal.

Like http://site.com/images/cool/../ will lead to the same place as http://site.com/images/


You can use <base href="..."> in the head of the document to indicate the starting location of all the relatively linked entities instead of doing the dots thing for each of them.

Doesn't matter really, just saying for reference.

matt_h
05-24-2006, 11:16 AM
I love you. That works. :D

err, thanks

Tryxx
05-24-2006, 11:17 AM
The reason the two dots work is because they indicate a directory transversal.

Like http://site.com/images/cool/../ will lead to the same place as http://site.com/images/


You can use <base href="..."> in the head of the d0cument to indicate the starting location of all the relatively linked entities instead of doing the dots thing for each of them.

Doesn't matter really, just saying for reference.

That does seem much easier. At least just saving some time of adding a couple dots everywhere.

err, thanks

I starred at the screen last night just kind of blankly for a couple hours wondering what to do... so yeah. :p