web local html viewing in web browsers

theperson34

Registered
Hey, I have Mac OS X Leopard, and I am working on making a web site. I am using Coda/Espresso for my main HTML editing and Photoshop for image editing. When I try to preview the HTML file in any browser (including Coda's and Espresso's), it displays the HTML and the CSS and Javascript and stuff fine, but the images are not shown, but when I view it from the server, they show up just fine.

I have the site folder located at /Users/myusername/Sites/, and all the links are in this format: /folder/file.png I would prefer not to change the links to the full link URL such as: /Users/myusername/Sites/folder/file.png because that would mess with the server links too.

What should I do about this and how can I fix it? I thank you so much for helping me with this problem.
 
Hi theperson34
You should use:
./folder/file.xxx
or
folder/file.xxx
to display images (or in a general way, to get files in nested folders).
Tip:
When previewing and not getting images displayed, ctrl-click (or right-click) on the little blue icon (the one with a white question mark) then select "open image in new tab/window". Looks at the url, this is something like:
localhost/folder/image.xxx
and should be
localhost/website_folder/folder/image.xxx
Hope this helps.
 
Back
Top