41 users online (0 members and 41 guests)  


  Results 1 to 7 of 7

Related

  1. advice    Forum: Search Engine Optimization - SEO - Forum
    Replies: 3
  2. Need Advice..    Forum: Graphics Forum
    Replies: 10
  3. need how to advice!    Forum: HTML Forum
    Replies: 8
  1. #1
    shonaii's Avatar
    New User

    Status
    Offline
    Join Date
    May 2003
    Posts
    9

    Question Need some advice

    I am building an html library on my computer. I would like it to be self contained and know how to link down to sub folders w/o referring to the file path, but how do you link back up to a directory w/o having to refer to the entire file path from the drive down?

  2. #2
    benzden's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2002
    Location
    San Antonio, Texas
    Posts
    652
    Are you talking about relative linking like ../../folder1/file.htm to go back two levels from this folderA/folderA2/file.htm to the other?

    If not, give us the locations for two files in separate folders that you want to link to each other. (I do this all the time with the 1,000+ web sites I have on the internet which are also on my hard drive and linked to each other in just such a way.)

  3. #3
    shonaii's Avatar
    New User

    Status
    Offline
    Join Date
    May 2003
    Posts
    9
    I'm new to html so I don't know what you mean by reletive linking. I have a main folder: Library, which has subfolders: Authors and then more subfolders: Titles. My main library folder has the main library page in it and everything is linked from that. What I want is to link from one of the Title folders to an Author folder or the main Library page. It looks like this:

    Library (with Library.html loose in it)
    Author1
    Title 1
    Author2
    Title 1

    Does that explain it?

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Relative linking is when you do not put the full path to your folder in, you just use a 'relative path'.

    eg

    to link to a file in the same folder, the relative path would be

    Code:
    href="filename.htm"
    to link to a file in a folder 'below' the current folder, called Folder -

    Code:
    href="Folder/filename.htm"
    To link to a file in the folder above the current folder -
    Code:
    href="../filename.htm"
    the double dots (..) basically mean 'up one level'. You can mix all these up to get really complicated ones like ../../../FolderName/SecondFolder/filename.htm
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  5. #5
    benzden's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2002
    Location
    San Antonio, Texas
    Posts
    652
    library/author1/title1/file.htm is one file and library/author2/title1/file.htm is another.

    (Note that I've eliminated spaces and changed everything to all lower case - you should do the same or you'll be back here asking us all kinds of questions we've heard a million times.)

    to go from author 2 to 1 it would be:

    <A HREF=../../../library/author1/title1/file.htm>(author 1 title 1 file)</A>

    Do that and get it to work before attempting more - you may even figure it out by then. Those of us having been used to DOS for a long time find it pretty easy - everyone else being used to Windows OS and their long file names and spaces in file and folder names will find it to be more difficult.

  6. #6
    shonaii's Avatar
    New User

    Status
    Offline
    Join Date
    May 2003
    Posts
    9
    Thanks, I tried it and have the hang of it. This is a great thing you have here! Hope you keep it up!

  7. #7
    benzden's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2002
    Location
    San Antonio, Texas
    Posts
    652
    Forums like these are how many of us got started - many of us also having had other programming experience before HTML and JavaScript et al. Welcome to the forums.



Tags for this Thread