Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Not a major issue but also a waste by duplicating files. I have to put index.php as well as styles.css on every directory level of folders on a website in order to get things to work properly.

I am Not a website designer and this is probably a dumb question but I would appreciate any advice. The css code as well as the index.php has references for
(./.images/file.png)
with the './.' presumably for the path to be used to find the images folder (in this case). the same path of ./. occurs in most all of the files that are used there.

What can I change to set the css, index.php, and a couple of other files so they work on all subdirectory levels inside the 'Documents' section but only when a viewer is inside the 'Documents' section. The rest of the site has its own css and index files.

The 'Documents' section is inside the website cache folder and is normally not accessed by website Viewers. The files that were added specifically to make the 'documents' section have a better 'look' are working fine but only if all of them are added to every subdirectory inside 'Documents'. If not, the view defaults to the Apache default settings for directory list.

What I have tried:

i tried changing the ./. to various other options but never found one that worked. I feel sure this is taught in Website-101 but unfortunately I never attended :(
Posted
Updated 29-Oct-19 13:06pm
v3
Comments
St0rmi 5-Nov-19 7:57am    
Try to use url.
If the structure is:

Website/images/file.png

Use:

url(/images/file.png)

more info:

https://stackoverflow.com/questions/5815452/how-to-use-relative-absolute-paths-in-css-urls

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900