View Full Version : File folder management/configuration of a website
01-24-2012, 03:07 PM
I have a question regarding html, php, shtml, etc. pages and the css that goes with them. If I place my main navigation pages inside a folder marked "nav," for example, should the css for those pages be in that folder as well, or should the css for the entire site be inside one folder marked css? This may be a silly question, but I don't want to try to reinvent the wheel when someone else may have already discovered the best way to manage site folders.
01-24-2012, 05:34 PM
The organization of your site folders is up to you of course, based on whatever works well for you. So there isn't going to be a "this is the right way to do it" answer. I'm assuming you knew that, I'm just repeating it here.
That said, what *I* do is organize my folders like:
/site - this includes css, and other site organization stuff
/articles - maybe I have a series of articles that get posted
/data - maybe I have a folder of XML files or other data sources
I keep all my normal user-accessible pages (php, html, etc) in the top-level folder.
Typically my site.css file contains all my CSS (more efficient network-wise to load one CSS file than several). So I'd have a /* this is the css for navigation */ block somewhere in the larger css file. The exception I make to this is if I got my navigation (or other parts of the code) from some third party, where they deliver a package that includes a folder /bobs-cool-navigation which includes their code, documentation, css, etc. I will leave that stand as-is in their folder so that I don't need to change their links, or if I get an update from "bob" I don't need to do anything but drop the new code over the old code.
01-24-2012, 06:46 PM
Okay, I understand. Thanks, Dave. You answered another question that I have been tumbling around in my head as well: Do I use more than one css document. I've used the comments lines to keep track of different parts of the same page, but never to keep track of the styling of other pages. I like this idea and think I'll go with this approach. I can see how easy it would be to have just one css.
Thanks for your help. I appreciate it.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.