SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Web development best working practices

    Are there any recognised best practices for web page writing/management

    Maybe this is just one of these things that doesn't matter, but as a very new web page maker, I have now read through several books, and was expecting some suggestions for things like:

    Structuring a css file, e.g. do you always put h1,h2 styles etc as the first thing in the file, do you put element definitions all together etc

    Do you break pages into groups and place in separate folders, with individual css files in the same folder for these pages.

    Am I just missing finding advice on these sorts of things, or is just something that people do ther own thing with. I would have thought with something like web sites where one developer may well take over a web site developed by someone else that things like this might have existed.

    Many thanks

    Graham

  2. #2
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    myotis, well everyone has a different way of working, personally I prefer the approach of a seperate folder for each type of file... for example CSS will go in a folder called "style", images in the "images" folder, JavaScripts in the "scripts" folder and RSS / Atom files in a "feeds" folder, but it doesn't make much of a difference, its more organisational than anything else.

    As for CSS, I always place global declarations first (so H1, H2, P, Body, etc) and then follow it with classes (as they are shared) and finally ID's, it helps reduce specificity issues as your setting the default styles for elements, overwriting them with shared styles, then finally overwriting them with any individual styles

  3. #3
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alex,

    Thanks that's actually very useful, and helps me think about the sructure a bit more constructively. In fact since my original post I have found some references to using different folders for different css components.

    Graham

  4. #4
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I appreciate the question and the answer. I've been wondering some of this stuff too.

    RVC

  5. #5
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by RVC View Post
    I've been wondering some of this stuff too.

    RVC
    Yes, its one of those obvious to those who know. I did find a site that suggested creating a master.css that was loaded by index.html, that simply contained links to layout.css styles.css etc.

    The idea being that you could develop aternative css file layout1.css, layout2.css and make major chnages to the web site by simpl changing the link in the master.css file.

    However, I cant find the site now, and can't remember how you set up the links.

    Graham

  6. #6
    Mazel tov! bronze trophy kohoutek's Avatar
    Join Date
    Aug 2004
    Location
    Hamburg, Germany
    Posts
    4,248
    Mentioned
    30 Post(s)
    Tagged
    0 Thread(s)
    There are so many ways to go about structuring your site. There isn't a one-fits-all kind of solution. Every designer/developer will have his/her own method.

    Here's a nice article that might be of interest to you. If you click on their CSS category, you might find a few more articles touching on your subject of interest. In the end, you will find yourself developing your own strategy, but some of the information might inspire.
    Maleika E. A. | Rockatee | Twitter | Dribbble



  7. #7
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kohoutek View Post
    There are so many ways to go about structuring your site. There isn't a one-fits-all kind of solution. Every designer/developer will have his/her own method.
    That is a really useful link, it certainly gives me a much better idea of potential good practice. Thanks.

    Graham

  8. #8
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes sir, that is a "pretty nice" article indeed! Thanks for it.

    RVC


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •