• 0

html linking


Question

8 answers to this question

Recommended Posts

  • 0

the image is on my server. but see my lay out is always refering to http:kxgard3.<< spam >>/images/*.*.

I would like it so that i would only have to type for example <a href "images/*.*> and it would automaticly know to look in http:kxgard3.<< spam >>/.......

Link to comment
Share on other sites

  • 0

In order to make a relative path to an image, both the .html (or .htm) file and the image file have to be on the same server. Since you say that this is already the case, just tell us where the image is relative to the HTML page (in other words, which folder is each one in?).

For example, if both the image (or whatever other file you may have) and the HTML page are in the same directory, you don't have to type out the whole URL, but only the name of the image (with extension). If the image is in a separate directory that is in the same directory as the HTML page, just type the folder name, followed by a slash (/), and then the name of the image (with extension). If the image is in a separate directory above the HTML page, it may get tricky, but for each directory you have to go up, you would place a double period (..), and then a slash, and then the name of the image (with extension).

If this confused you, don't worry. We can solve your problem rather quickly if you simply tell us where the image is relative to the HTML page.

Edited by Hawkeye
Link to comment
Share on other sites

  • 0
Use Dreamweaver and all you have to do is click on a button to insert image

You know, that actually is a good suggestion, and I would agree with you, but not everybody is fortunate enough to have access to Dreamweaver. ;) :unsure:

Link to comment
Share on other sites

  • 0
You know, that actually is a good suggestion, and I would agree with you, but not everybody is fortunate enough to have access to Dreamweaver. ;) :unsure:

yeah I have dream weaver but when i place my templets they are stored on my hard drive. So when I am ready to upload. I have to go through all the code and retype the entire url.

my html file is stored in folder: kxgard3.<< spam >>/public_html/index.htm

the images that are used on my templet is kxgard3.<< spam >>/public_html/images

so all I would have to do then is just put the url as ../images/*.*

right.

Link to comment
Share on other sites

  • 0
yeah I have dream weaver but when i place my templets they are stored on my hard drive. So when I am ready to upload. I have to go through all the code and retype the entire url.

my html file is stored in folder: kxgard3.<< spam >>/public_html/index.htm

the images that are used on my templet is kxgard3.<< spam >>/public_html/images

so all I would have to do then is just put the url as ../images/*.*

right.

Nope. It's even simpler than that.

In your case, whenever you need to indicate the images, since they are only one folder below the HTMl file, you simply have to type in images/[image name with extension].

For example, if you had an image named image.jpg , you would have the following in your HTML for the image:

&lt;img src="images/image.jpg"&gt;

Obviously, if you normally include the height and width and alt text for the image, you can add that into the code as well.

Link to comment
Share on other sites

This topic is now closed to further replies.