English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have an external CSS file and a website. How do I make the CSS file accessible to the files from the subfolders of the website? I know it has to be something like but what is it for the files in more subfolders?

2007-01-20 19:30:56 · 4 answers · asked by Fr0z3nByt3 3 in Computers & Internet Programming & Design

4 answers

If the CSS file is in

yourfolder

and the HTML file is in

yourfolder/subfolder/subfolder

then you can add



So for each subfolder you add another "../".

Two dots means "one folder up", a single dot means "in this folder".

2007-01-20 20:40:57 · answer #1 · answered by Vincent Z 2 · 0 0

I'm not an expert, but I understand what you are saying. My thoughts would be no it's not possible. Perhaps you could just link to a separate css page from PHP. You can have as many css pages as you want. Sometimes you may want one for each style, or page, or indiviual content, or for browser fixes. Although, you would want to include most of the defalt style on one page, so it's easily updated.

2016-05-24 04:07:41 · answer #2 · answered by Anonymous · 0 0

each level of subfolders would add a level of "../" to the path
or you can set a base folder in the head of the document with:
. any relative paths in the document will start from that folder.
so if style.css is in your webpage folder on your c: drive, you would have:




and then if you wanted to include the picture smith.jpg from the folder c:\webpage\employees in the body of the document:

or if the employees folder was a sibling of the webpage folder, the path would be "../employees/smith.jpg"

Hope that helps!

2007-01-20 21:06:35 · answer #3 · answered by headmaster382005 2 · 0 0

It should still be accessible if you type out the full URL of the CSS file.

2007-01-20 20:04:02 · answer #4 · answered by Lotii 3 · 0 0

fedest.com, questions and answers