hi im new to web designing. i've created a website with multiple sub-folders. for all the webpages i have a navigation bar which contains images.
i've tired using SSI to link the navigation.shtml file but didnt work. php include worked for me. however the images dont appear correctly since the links are different for each folders and subfolers.
for example, www.mywebsite.com/navigation.php is where i've kept the navigation. www.mywebsite.com/images/ is where i kept the images in the navigation. webpages that are within the top most folder will display the images correctly when i link the navigation file.
however for webpages like www.mywebsite.com/animals/red/green.php if i link the navigation files the images wont appear since the direct links to the images are not correct. is there any way i could use one navigation file and link to all webpages in different subfolers? or do i have to create a similar navigation and images folder and place it in all subdfolders so the links to the images will work?
sorry correct me if im wrong. external css links images relative to the css files itself and not from the file that contains the external css file. and php include and ssi does otherwise right?
sorry it may sound a little confusing. really hope someone could help me clarify this.
thanks alot.
Edit:
sorry i've got another doubt if a file has the link logout.php it is a relative link to where the file is. if the link is /logout.php the link becomes relative to the root folder? cause if i add the / in front all the image link in my navigation file the problem is solved and all the images work fine when i link it to any file in any subfolder.
sorry for all the trouble.
i've tired using SSI to link the navigation.shtml file but didnt work. php include worked for me. however the images dont appear correctly since the links are different for each folders and subfolers.
for example, www.mywebsite.com/navigation.php is where i've kept the navigation. www.mywebsite.com/images/ is where i kept the images in the navigation. webpages that are within the top most folder will display the images correctly when i link the navigation file.
however for webpages like www.mywebsite.com/animals/red/green.php if i link the navigation files the images wont appear since the direct links to the images are not correct. is there any way i could use one navigation file and link to all webpages in different subfolers? or do i have to create a similar navigation and images folder and place it in all subdfolders so the links to the images will work?
sorry correct me if im wrong. external css links images relative to the css files itself and not from the file that contains the external css file. and php include and ssi does otherwise right?
sorry it may sound a little confusing. really hope someone could help me clarify this.
thanks alot.
Edit:
sorry i've got another doubt if a file has the link logout.php it is a relative link to where the file is. if the link is /logout.php the link becomes relative to the root folder? cause if i add the / in front all the image link in my navigation file the problem is solved and all the images work fine when i link it to any file in any subfolder.
sorry for all the trouble.
Last edited: