Page 1 of 1
[S0LVED] get image from parent folder?
Posted: Mon Jul 30, 2007 10:54 am
by mikeeeeeeey
Hi guys,
Is there any way to reference an image(or file i.e. stylesheet, js etc.) from a parent/grandparent directory?
Thank youuuuuuu.
Posted: Mon Jul 30, 2007 10:57 am
by onion2k
../ for the parent directory.
../../ for the grandparent.
Posted: Mon Jul 30, 2007 11:00 am
by mikeeeeeeey
That made my eyes water with relief onion2k, thank you.
(excuse the horrid pun!)
Posted: Mon Jul 30, 2007 11:12 am
by onion2k
You might find it easier to add a <base> tag to you site. For example..
<base href="
http://www.ooer.com/" />
..would make all of your URLs relative to "
http://www.ooer.com/". An image tag of <img src="images/onion.gif"> would be fetched from "
http://www.ooer.com/images/onion.gif". It's a much nicer solution than messing around with parents and grandparents and stuff.