Results 1 to 2 of 2
Thread: How to handle paths ?
Nov 9, 2012, 05:25 #1
- Join Date
- May 2005
- 0 Post(s)
- 0 Thread(s)
How to handle paths ?
My directory structure is like this:
I have a css file in /css folder which needs some images which are in the /images folder respectively.
In /admin folder I am linking that css file. But its not able to get the required images from the /images folder which is outside.
I need to use that css file both in / and /admin.
Now i can't go uploading the images in each folder that I use the css file in.
How do I go about it ? So no matter from where I call the css file, it simply gets the images from /images folder ?
Nov 9, 2012, 05:28 #2
- Join Date
- Mar 2009
- Melbourne, AU
- 298 Post(s)
- 5 Thread(s)
Hi Tapan. Yes, this is quite straight forward, and you only need the images in one place. The important thing is to get the path right from your CSS file to the images folder. You can do it in two ways, either:
I prefer the second method (with the slash at the start), but either is OK.
The first one meand: "go up one folder, find the images folder there, and find the image.gif file inside that". The second one says: "go to the site's root folder, find the images folder inside that, and find the image.gif file in that".