Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-24-2012, 03:07 PM   PM User | #1
Kevin_M_Schafer
Regular Coder

 
Kevin_M_Schafer's Avatar
 
Join Date: Apr 2011
Location: Fairfax, Minnesota, U.S.A.
Posts: 482
Thanks: 97
Thanked 17 Times in 17 Posts
Kevin_M_Schafer is an unknown quantity at this point
File folder management/configuration of a website

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.

Thanks.

--Kevin

.
__________________
My keyboard is an IBM from 1993 and I like it that way. | Who is Dan Well? Everyone always says I know Dan Well.Building a web page is like building a birdhouse. Put it up there and watch 'em come. | Maintaining the aspect ratio of an image is more important than having a cold orange pop.
Kevin_M_Schafer is offline   Reply With Quote
Old 01-24-2012, 05:34 PM   PM User | #2
tracknut
Regular Coder

 
Join Date: Aug 2006
Posts: 892
Thanks: 4
Thanked 206 Times in 205 Posts
tracknut is an unknown quantity at this point
Hi Kevin,

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
/images
/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.

Dave
tracknut is offline   Reply With Quote
The Following 2 Users Say Thank You to tracknut For This Useful Post:
jon22 (01-25-2012), Kevin_M_Schafer (01-24-2012)
Old 01-24-2012, 06:46 PM   PM User | #3
Kevin_M_Schafer
Regular Coder

 
Kevin_M_Schafer's Avatar
 
Join Date: Apr 2011
Location: Fairfax, Minnesota, U.S.A.
Posts: 482
Thanks: 97
Thanked 17 Times in 17 Posts
Kevin_M_Schafer is an unknown quantity at this point
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.

--Kevin

.
__________________
My keyboard is an IBM from 1993 and I like it that way. | Who is Dan Well? Everyone always says I know Dan Well.Building a web page is like building a birdhouse. Put it up there and watch 'em come. | Maintaining the aspect ratio of an image is more important than having a cold orange pop.

Last edited by Kevin_M_Schafer; 01-24-2012 at 06:46 PM.. Reason: text clarity
Kevin_M_Schafer is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:50 PM.


Advertisement
Log in to turn off these ads.