0

For my internet programming class I have to create a XHTML file that has an image in it, among other things. The problem that I am having is that when I open up my file on other computers the image will not load. The file path is valid on my own computer but of course when I move to other computers the image does not load. Help.

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by cdudefire
1

could you please post your code.
I think the problem is that you used an absolute path for your image.
For example, you probably used something like

<img src="C:/Documents/website/image.jpg" alt="My image"

.
To make your code portable on many computers, you should use a relative path like this:

<img src="website/image.jpg" alt="My image"

where "website" is the folder your image is located in.
Also, I'm assuming you have the embedded image on the other computer you are viewing the website on... it's an error that others have made.

0

I did use a absolute path instead of a relative path. It changes everything.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.