External Files - Java and CSS - Multiple or One?

Discussion in 'HTML & Website Design' started by wd_2k6, Mar 22, 2008.

  1. #1
    Hi I was wondering would you consider it better to have all my CSS in one external file rather than split up to 2 or 3 external files.
    The same goes for my Javascript.

    I just think my head looks a bit of a mess so i'm considering shoving everything in one CSS file and one Javascript file.
     
    wd_2k6, Mar 22, 2008 IP
  2. blueparukia

    blueparukia Well-Known Member

    Messages:
    1,564
    Likes Received:
    71
    Best Answers:
    7
    Trophy Points:
    160
    #2
    For CSS, make different styleseehts for different media: one for computer screens, and one for print.You can even make one for phones, or - for blind people - Aural stylesheets.
     
    blueparukia, Mar 22, 2008 IP
  3. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #3
    So what if your head looks a bit long? Who do you expect is going to be looking at your code? As long as it's indented fine and you know what each bit is it doesn't really matter, unless of course it's purpose is so that it's easy for multiple people to understand it.

    I usually have it in multiple files, adding them to the page(s) they are needed on only, saves the download of a document that isn't needed for a start.
     
    twistedspikes, Mar 22, 2008 IP