SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2002
    Location
    Connecticut
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with path

    I'm using Adobe GoLive CS and had a site on my computer. Everything worked fine, the paths were all correct. When I would open a file,
    the images would show and everything looked great.

    But I have copied the site onto a cd and brought it to my client. I put the site, with all the corresponding folders, onto the clients computer.

    Now the paths are not the same. I've tried putting my site into different folders on the client's computer but always get the same problem---the path is one folder off, meaning I have this code in my files: (../../../images/picture.jpg) when it should be (../../images/picture.jpg).

    How can I correct this problem? It seems like it may
    be easy to have every path within my site become one
    folder short, or one less folder shown in the path.

    Thanks for any help.

    -Chris

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why is this in the accessibility forum?

    You need to stop writing relative paths - imagine the headache if you decided to change your directory structure...

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2002
    Location
    Connecticut
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So I should have all my image paths, css paths and file paths as

    http://mysite.com/folder/images/image.jpg

    instead of ../../image.jpg

    ?

  4. #4
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You don't need to go quite that far - if you start your src location with a "/" it will reference from the root of the site (unless you have specified a different root with the <base> tag). So this will look in the /images folder regardless of how deep in the site it is:
    Code:
    <img src="/images/pic.gif">

  5. #5
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Buddy Bradley
    You need to stop writing relative paths - imagine the headache if you decided to change your directory structure...
    Relative paths work fine. Something occured in the burn process. I've burnt entire web sites onto a CD with no paths problem. I would say your problems exist elsewhere. But you don't need to change your paths necessarily, since you can't view a site root relative image on your local machine.
    Ryan Butler

    Midwest Web Design


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •