Click to See Complete Forum and Search --> : Linking


chris9902
08-20-2003, 12:27 PM
ok i am not very happy but this is a simple problem and that makes it worse.

i am making a site on my computer and testing it locally but in the folder were me site is i have 5 pages.

lets call them 1,2,3,4 and 5

for each page i have a folder so it looks like this in the brower 1/page.html

ok, but the page in folder 1 i can use 'images/top.gif' becuase it is looking for it in that folder when it is not.

so i no how to do that i add ../ so it looks like ../images/top.gif

but if i have a folder inside the 1 folder, so now it looks like this 1/newfolder/page2.html.

now for page2.html i can't use ../images/top.gif becuase it is looking for it in the 1 folder.

so (here is the question) how to i link back to the original folder it is in, and not by putting C:/ or whatever becuase i would have to change the whole site when i upload it to the server.

thanks to anyone who can help me i really need it.:)

:eek: :confused:

pyro
08-20-2003, 12:33 PM
You just need one more ../ (which is telling the browser to look up one directory. So, it would look like this:

../../images/top.gif

chris9902
08-20-2003, 12:34 PM
oh thank you.

i did not think of that.

thanks Pyro you are a life saver:D :D :D :D :D :D :D :D :D

pyro
08-20-2003, 12:35 PM
lol... You are very welcome... :)

chris9902
08-20-2003, 12:36 PM
:( now i have to go through all my (300 odd pages) and add this in.

damn :(