View Full Version : Define Site Root and relative Path

11-28-2008, 02:46 PM
I need to link my images by relative path, but im not sure how to do it. I think I need to start by having a root folder, right? I built my first site but i never defined a root folder, how can i do this now that the site is complete?

11-28-2008, 03:24 PM
The root folder is the main/opening section of your website. This is where you would have your index/main page.

Relative path is the path into folders required to obtain the page or image.
Example to obtain an image inside a first level folder;
To obtain an image inside a second level folder;

11-28-2008, 03:38 PM
a friend told me that i could do it using this code:

<href img../images/myimage.jpeg>

Is that right? something to do with the dots meaning "folder above"

11-28-2008, 04:05 PM
To call an image for display in a page it should be coded as <img src="pathtofolder/image.jpg" />Each ../ will move you back one folder/level

11-28-2008, 04:18 PM
For a full and proper image call tag you need to have the width, height and an alt tag.<img src="pathtoimage/image.jpg" width="???" height="???" alt="Image description" />