I have a medium-sized website that shares a common header/footer, and each page has its own specific layout file. The common header/footer is stored in a separate html file, but I am struggling with where to place the CSS file because the link element in footer.html
<link rel="stylesheet" type="text/css" href="footer.css" />
does not link to the current directory of this html file, but to the requiring PHP file.
After looking at several websites, there doesn't seem to be a standardized solution. Some recommend placing all CSS files in root-directory/css
, while others opt for hierarchical directories like '/skin', '/global'
, etc. Yet another approach some websites take involves using links like
http://sstatic.net/stackoverflow/all.css?v=5fc0e3026fcc
(similar to how Stack Overflow handles it).
So my question is, which approach would be better suited for my situation?
P.S. I believe this issue could also extend to image file storage as well.