New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus • Advice and insight from world-class Apple enthusiasts • Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Web Design and Hosting Creating sites, scripting, and hosting discussions.

Re: Displaying graphics


Post Reply New Thread Subscribe

 
Thread Tools
marlonolram
Guest
 
Posts: n/a

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???

Thanks
QUOTE Thanks
muso

 
muso's Avatar
 
Member Since: Jan 15, 2003
Location: Whangarei, New Zealand
Posts: 2
muso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond repute
Mac Specs: Pwnt

muso is offline
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.

I'm in your forums, writing sentences in a grammatically acceptable manner.
QUOTE Thanks
Murlyn

 
Murlyn's Avatar
 
Member Since: Jun 11, 2003
Location: Mount Vernon, WA
Posts: 4,909
Murlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to all
Mac Specs: MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2

Murlyn is offline
Quote:
Originally Posted by muso
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.
Wait a minute.. no no, that's not true, yes you need to write your images with a forward slash / instead of a back slash \, but all web servers, windows, macs, unix etc can use the / in front all this says is to start in the web root directory, which is usually public_html or htdocs or some such, and then go into the images directory which is within the web root directory, then open up shimTrans01.gif. All web servers allow this syntax.

Cheers!
QUOTE Thanks
meerk
Guest
 
Posts: n/a

Quote:
Originally Posted by Murlyn
can use the / in front all this says is to start in the web root directory, which is usually public_html or htdocs or some such, and then go into the images directory which is within the web root directory, then open up shimTrans01.gif.
Not quite true unfortunately. You need to put in a couple of 'dots' before the first 'forward slash'

eg (from your code)
img src="\images\shimTrans01.gif"

…this should be
img src="../images/shimTrans01.gif"

This is assuming that both the 'page' and 'images' folders are in the same directory.
Hope this helps

meerk…
QUOTE Thanks
Murlyn

 
Murlyn's Avatar
 
Member Since: Jun 11, 2003
Location: Mount Vernon, WA
Posts: 4,909
Murlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to all
Mac Specs: MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2

Murlyn is offline
Quote:
Originally Posted by meerk
Not quite true unfortunately. You need to put in a couple of 'dots' before the first 'forward slash'

eg (from your code)
img src="\images\shimTrans01.gif"

…this should be
img src="../images/shimTrans01.gif"

This is assuming that both the 'page' and 'images' folders are in the same directory.
Hope this helps

meerk…
Actually a couple dots with a forward slash ../ means go back one directory, it does not mean go back to the web root.. so for instance if your directory structure was like this:

/public_html/forums/macforum/webdesign/

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

Cheers!
QUOTE Thanks
meerk
Guest
 
Posts: n/a

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…

meerk
QUOTE Thanks
Murlyn

 
Murlyn's Avatar
 
Member Since: Jun 11, 2003
Location: Mount Vernon, WA
Posts: 4,909
Murlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to all
Mac Specs: MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2

Murlyn is offline
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.

Change
<img src="images\floodLogo02.jpg">

To
<img src="images/floodLogo02.jpg">

And your page will show up the way you want it

Cheers!

Rick
QUOTE Thanks
muso

 
muso's Avatar
 
Member Since: Jan 15, 2003
Location: Whangarei, New Zealand
Posts: 2
muso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond repute
Mac Specs: Pwnt

muso is offline
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.

I'm in your forums, writing sentences in a grammatically acceptable manner.
QUOTE Thanks

Post Reply New Thread Subscribe


« IE WYSIWYG editing... problems | Question »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Graphics settings in os x mac_noobie Apple Notebooks 4 03-06-2005 02:21 AM
Apple's Attention To Graphics Verrminator Switcher Hangout 6 02-18-2005 11:29 PM
G3 graphics card datasmog Other Hardware and Peripherals 3 05-09-2004 11:36 PM
Need Help... What type of DVD drive can I install in my G4 400Mhz PCI Graphics? Rumblefish Apple Desktops 1 03-26-2004 12:55 PM
Designing Web Graphics schweb Web Design and Hosting 12 09-01-2003 03:40 AM

All times are GMT -4. The time now is 01:44 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?