Relative links

windows

Guest
I am designing my web site. I have put all my images in a folder: Photos.<br />
But when I link to them from a htm page, the link fails (not found).<br />
<br />
Check the link properties here:<br />
<br />
Morse Home (<!-- m --><a class="postlink" href="http://home.twcny.rr.com/suecortland/Test.htm">http://home.twcny.rr.com/suecortland/Test.htm</a><!-- m -->) <br />
<br />
It shows the 'MorseHome.jpg' image in the 'Photos' folder.<br />
<br />
However, if I put the image in the same folder as the htm page, it works. Like so:<br />
<br />
Morse Home (<!-- m --><a class="postlink" href="http://home.twcny.rr.com/suecortland/Test2.htm">http://home.twcny.rr.com/suecortland/Test2.htm</a><!-- m -->) <br />
<br />
This link omits the 'Photos' and I put a copy of the image in the base folder.<br />
<br />
After spending much of a week on this, I am about ready to give up. Help?<br />
<br />
<br />
<br />
I will be using many of the images more than once so I would prefer to have them all in 'Photos'; if I can get the links to work. The link '/Photos/MorseHome.jpg' doesn't seem to work either.<br />
<br />
Help?<!--content-->One tip. Make all names in lower case to avoid any sort of problem with case. Additionally never use spaces or odd punctuation in any names.<br />
<br />
href=http://www.htmlforums.com/archive/index.php/"../../Photos/MorseHome.jpg" is not correct.<br />
<br />
href=http://www.htmlforums.com/archive/index.php/"Photos/MorseHome.jpg" (with no / at the beginning) means the Photos folder is one level below the folder where the HTML page is.<br />
<br />
href=http://www.htmlforums.com/archive/index.php/"/Photos/MorseHome.jpg" (begins /)means the Photos folder is one level below the root folder of the website base.<br />
<br />
I think you need this last one! I guess you inherit the ../../ prefix from the structure on your hard drive, where your web site is probably in a lower-level folder than the level it is actually in on the site itself.<!--content-->This one is working:<br />
<!-- m --><a class="postlink" href="http://home.twcny.rr.com/suecortland/Photos/MorseHome.jpg">http://home.twcny.rr.com/suecortland/Ph ... seHome.jpg</a><!-- m --><br />
<br />
But your jumping back, to far......<br />
<a href=http://www.htmlforums.com/archive/index.php/"../../Photos/MorseHome.jpg"><strong><br />
<br />
What editor are you using?<br />
To insert an image with Arachnophilia is easy.<br />
And the path is then ok.<br />
Tutorial:<br />
<!-- m --><a class="postlink" href="http://members.tripod.lycos.nl/vazed">http://members.tripod.lycos.nl/vazed</a><!-- m --><br />
<br />
:rocker:<!--content-->I've been screwing around with Front Page Express for a week now. 5 minutes with Arach and the job is done and working. Thanks.<!--content-->Your welcome.<br />
And now "the use of tables" to create a nice layout ;)<br />
<br />
:rocker:<!--content-->Yes, I found out about tables. About a month ago I decided to setup my web site. Here is my first attempt. I am leaving it in place and working on enhancements:<br />
<br />
My Web Page (<!-- m --><a class="postlink" href="http://home.twcny.rr.com/morsecortland/barnhart.htm">http://home.twcny.rr.com/morsecortland/barnhart.htm</a><!-- m -->)<br />
<br />
<br />
<br />
Don<!--content-->Are you sure you're a beginner? Heehe. You have valid, well-formed code (<!-- m --><a class="postlink" href="http://validator.w3.org/check?uri=http%3A%2F%2Fhome.twcny.rr.com%2Fmorsecortland%2Fbarnhart.htm;ss=1;sp=1;outline=1">http://validator.w3.org/check?uri=http% ... ;outline=1</a><!-- m -->) on your site.<!--content-->
 
Back
Top