Re: Displaying graphics
OK, I have developed a website on a PC but I have no access to a MAC to check the site out. Apparently, there are many graphics that are not being displyed for some reason (I am pretty much convinced it is something really simple like an incorrect path or something) but without access to a MAC, I can't check out what the problem is!!
The URL is www.theflood.com.au - the source code is available to take a look at - any one have any ideas please???
Some of your image tags are written with a path like this: \images\shimTrans01.gif
It should be images/shimTrans01.gif - macs, and unix based hosts use paths with foward slashes and no slash at the start. Windows looks as though it supports both, so that's where your problem is.
eg (from your code)
…this should be
This is assuming that both the 'page' and 'images' folders are in the same directory.
Hope this helps
And you had an html document within the webdesign directory and you wanted to access an images directory within the macforum directory you could make your link three ways:
1) <img src="http://www.example.com/forums/macforum/images/test.gif" />
This is an absolute link
2) <img src="../images/test.gif" />
This is a relative link
3) <img src="/forums/macforum/images/test.gif" />
This also is a relative link
The first one takes the absolute link, finds the server, even though it's localhost and outputs your image.. this actually takes more time since it has to do a dns lookup, etc etc on the domain name.
The second knows that it is on the same server so does not have to do a dns lookup. and it says.. go back one directory "macforum" then within the "macforum" directory go into the "images" folder.. now if your images folder was in the "forums" directory you could do this <img src="../../images/test.gif" /> which means go back two directories then go into the images directory.
The third by using the first slash to go to the web server root, not the machine root this is done by the server software to prevent people from surfing through your file structure, then it says go to the macforum directory, then the images directory then show test.gif
You're right, but…
…I still think that it's something to do with those 'backslashes' and starting off the path with one of them??
Anyways it's late and I'm fed up marking-up our company's new site.
I'll take another look tomorrow and ponder…
I havent looked at his code yet.. so I guess I might as well do that and help him out :) At least he understands the way directory structure works now.
Ok he has only one problem.
And your page will show up the way you want it :)
While it is supported to add a '/' in front of any path, it is not general practice.
What you should do marlonolram (if this isn't your setup at the moment), is have all your html/php/xhtml files in one folder (normally your root directory) and inside the root directory have one folder named images. I find this is the easiest way to manage links. That way, any internal file links can just be linked to with their file name, and all images just have a "images/" before them.
Always use foward slashes, and remember to define a base uri if you're using relative links.
|All times are GMT -4. The time now is 04:10 AM.|
Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.