Basic linking

He has: 688 posts

Joined: Feb 2001

I've been making sites for a while but I never really learned the right way to do things Smiling I suppose now is a good time to fix things.

Whenever I linked to a file that was not in the same folder or within a folder directly 'below' it, I would always code the full url. So what is the correct way to link to a file one level up, or two levels up, or even one level up and then down into another folder (you get the point).

// .. Confused

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

../ one level up
../../ two levels up
foldername/ one level down
foldername/foldername/ two levels down

../foldername/ one level up, one level down

Better yet...

/foldername/ -- from root
/foldername/foldername/ -- still from root.

He has: 688 posts

Joined: Feb 2001

cool. that's just good stuff to know. thanks Wink

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.