+ 1
How to create folder
css
4 Answers
+ 4
You can't create a folder using CSS
0
ok
0
CSS is simply a set of cases defining when to apply the 'look' of a page. Thus, if you are looking to create a directory on the viewers machine, this logically can't happen.
On the other hand, if you're looking to store your CSS within a subdirectory of your website, you simply need to refer to it when defining the .css file, such as "www.mywebpage.com/index.html" using css that will be located at "www.mywebpage.com/CSS_Directory/CSSFileForMyWebPage.css"; similar to scripting languages, you can identify the path as it relates to the page by index.html, in this example, declaring the CSS source as "CSS_Directory/CSSFileForMyWebPage.css".
Using this logic, you could store all CSS files within a folder dedicated to only CSS, keeping your code cleaner if you intend to have numerous.
If this is indeed what you were asking, you would create a new folder within the main directory where you would store the files. Obviously, the same logic could apply to JavaScript and such.
Bear in mind that relational reference as mentioned above works easiest with SUBdirectories, and can be a bit more complex when the directories to be referenced are in higher or parallel directories. It is often in those cases easier to simply specify the entire path.
- 1
ashraf