Log in

View Full Version : Include file and images



chuco61
01-30-2009, 05:24 PM
i am having the hardest time adding images into an include file. It just will not show no matter what path i put absolute or root.

i have a main default page that is being controlled by a template in the Templates folder. Then i have an includes folder that the template is calling in.

what am i doing wrong?

jscheuer1
01-30-2009, 06:14 PM
If you are using the absolute path, you have either constructed an invalid or otherwise invisible image tag, or the image isn't where the absolute path indicates.

Remember also that for paths and filenames to be correct they much match exactly, upper and lower case matter.

If you want more help:

Please post a link to the page on your site that contains the problematic code so we can check it out.

chuco61
01-30-2009, 09:57 PM
here are the links

http://sanjoseca.gov/prns/default-rc.asp
http://sanjoseca.gov/prns/includes/LeftNavLinks-rc.asp

please help

thanks
rick

jscheuer1
01-31-2009, 01:58 AM
Well, for example, the absolute path to PRNS-inside-prns.jpg is:


http://sanjoseca.gov/prns/PRNS-inside-prns.jpg

But on the include page it is listed as (in the stylesheet), which is not its relative location to the includes page but may be to the page it is included on, but I don't think you want it showing as background anyway (a background image requires layout dimensions for the element that it is the background for equal to the image's dimensions):


#inside {background-image:url(PRNS-inside-prns.jpg);

and (in the markup on the includes page):


<img src="../PRNS-inside-prns.jpg"

Which is accurate relatively for the includes page's directory, but not for the prns directory where your page that has the include on it is located. I see also that you have lowsrc and longdesc attributes with various ways of listing the image. Those two are basically meaningless when it comes to fetching the file, but if you want to use them, that's OK with me. In any case, every place that it is listed where you actually want it to show up should use its absolute path:


http://sanjoseca.gov/prns/PRNS-inside-prns.jpg