I'm having some trouble with relative directories, this time in html. I've downloaded a working webste via ftp and I'm just trying to run it, but it won't work offline. Here is the homepage:
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<title>Performance House</title>
<link rel="stylesheet" href="/inc/style.css" />
<style type="text/css">@import("styleMacIE.css");</style>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="We work on your behalf to ensure you receive the level of service deserved as a customer." />
<meta name="keywords" content="performance house, mystery, shopping, surveys, consumer, research, benchmarking" />
<div id="content">
<h1>Performance House are working with you to improve quality and performance.</h1>
<p>
<img src="/img/eye.jpg" width="142" height="87" alt="" align="right" style="margin: 3px 0 0 8px;" />
We work on your behalf to ensure you receive the level of service expected and deserved as a paying or enquiring customer.</p>
<p>Our team of analysts are currently tracking the sales, marketing, helpdesks, employee & customer satisfaction, complaint handling, customer services and procedures of world leading organisations.</p>
<p>Working intently with customers, consumers and the world's media, our established links with government and regulatory bodies stimulate immediate improvements.
<p>With a unique commitment to improving quality and performance, Performance House inspires effective strategies to measure, manage and improve entire market sectors.</p>
</div>
<br />
</div><!--end of container-->
<img src="/img/ftr.gif" id="ftr" alt="" />
</div>
</body></html>
As you can see the images are done using:
PHP Code:
<img src="/img/ftr.gif" id="ftr" alt="" />
and not using the complete path name. I would have thought this fine, but when I run the web page it can't find the css or any of the images, why is this? Thinking about it it can't be the php include path because this is run as html and I get the same problems.
This really anoys me when seemingly trivial things won't work.
1. Have you tried right-clicking on the image and checking the properties as to know where the web-server/browser thinks that the image should be. It will display the full path.
2. Is the following actually there for the running of IE on Mac? If so, you can most likely get rid of it. Microsoft dropped all development of IE for Mac at the end of 2005. Before that, there was no real big major update. Mostly Mac users work with Safari or Firefox.
PJ: I've tried checking the dir, and it should definitely be able to find the images, they're only in a sub-directory. I took out the mac css but it didn't affect things.
Why don't you post a zip file with a folder of a couple of the images and a file with some of the folders from the directory tree. That would help us to see the directory layout.
Originally Posted by Nibinaear
I took out the mac css but it didn't affect things.
That shouldn't have fixed anything. I was just informing you that IE on Mac is, for the most part, obsolete.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Ended up doing an attachment anyway. The only differences between this and the original website are that this is html which the original is php (don't know why this should affect anything).
I've noticed by clicking right mouse button over images that they where refereing to images in c:/img even if the html file is in any other dir. Then i remembered from unix that / means root. So images are being searched on the /img... that means: a directory called img in the root dir (C.
Then i replaced all "/img" in the HTML to "img" and images where shown properly. Try doin't that.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.