PDA

View Full Version : using relative URLs in IE vs Netscape


ladybug
04-15-2001, 09:26 AM
I need help with linking pages or images that are placed in different directories. IE works fine using a URL that points to the correct file like this example: <img src="/usa/georgia/atlanta.jpg">. However it seems that whenever there is a link that goes back in the directory structure (for instance if the html doc for the page is in the "georgia" directory and I am trying to display an image that is in the "usa" directory), then Netscape will not display the file correctly. I realize that I could just use the entire URL for each image, as in: "http://www.mysite.com/usa/georgia/atlanta.jpg", but doing that would prevent being able to preview the site off-line. Is there a way to solve this problem?

Ian
04-15-2001, 10:55 AM
Hi Ladybug, welcome to HTMLForums,
This should not make any difference in IE or NS. What will make a difference though is if your directories are 2 words(or more) or have spaces in them. ie: /my site/directory/file.jpg will not work in NS browsers, but /my-site/...etc will. Also you can call your images (if in another dir) like so: <img src="../usa/atlanta.jpg"> and see if that solves your problem.
I hope this helps.