single or multiple CSS files

Discussion in 'HTML' started by Carolyn Marenger, Mar 3, 2005.

  1. Hey everyone, I am looking for your thoughts and opinions.

    Is it preferable to have one css file containing all the style information
    or break it up into multiple imported files for different types of
    formatting. For example, one file for page layout related items and
    another for text formattion?

    I have seen different combinations on different pages, and am wondering
    which people find is easier to maintain. Being from a coding background
    myself, I like to keep related things together, and move the rest to a
    different file, or files. Also being from a coding background, I'd prefer
    to learn by reading about others mistakes than duplicating them myself.

    Thanks, Carolyn
     
    Carolyn Marenger, Mar 3, 2005
    #1
    1. Advertising

  2. in alt.html, Carolyn Marenger wrote:
    > Hey everyone, I am looking for your thoughts and opinions.


    Also in ciwas. Don't multipost. See my reply there. It is not perfect, as
    I stopped writing it on moment I saw this.

    --
    Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
    Utrecht, NL.
     
    Lauri Raittila, Mar 3, 2005
    #2
    1. Advertising

  3. Carolyn Marenger wrote :
    > Hey everyone, I am looking for your thoughts and opinions.
    >
    > Is it preferable to have one css file containing all the style information
    > or break it up into multiple imported files for different types of
    > formatting. For example, one file for page layout related items and
    > another for text formattion?
    >
    > I have seen different combinations on different pages, and am wondering
    > which people find is easier to maintain. Being from a coding background
    > myself, I like to keep related things together, and move the rest to a
    > different file, or files. Also being from a coding background, I'd prefer
    > to learn by reading about others mistakes than duplicating them myself.
    >
    > Thanks, Carolyn



    I think it depends on what you are trying to accomplish....

    As I have some sites that use the same layout, but different colours,
    banners, images, I use two style sheets.

    one for the layout of the pages, and the other for the colour.

    eg... stylelayoutA.css contains things like.....

    ..leftmenu {width:100px;}
    ..topbanner {height:25px;position:absolute;top:0;left;0;width:100%;}
    p {font-family:sans-serif;font-size:.9em;}

    eg... stylebrandingXYZ.css contains things like.....

    ..leftmenu {background-colour:blue;}
    ..topbanner {background-image:url(......);}
    p {color:green;}

    This way, all my clients may use the same layout style, but they can
    brand it to whatever they like.

    --
    eat beef jerky
     
    Disco Octopus, Mar 3, 2005
    #3
  4. Carolyn Marenger

    Andy Dingley Guest

    It was somewhere outside Barstow when Carolyn Marenger
    <> wrote:

    >Is it preferable to have one css file containing all the style information
    >or break it up into multiple imported files for different types of
    >formatting.


    (IMHO) Both. One <link> element, but @imports inside this CSS file
    to join the modules. The referenced CSS document might just be called
    "main.css" and only the imported ones get names like
    "foocustomer_menu_verypinklook_christmasspecial.css"

    Some browser somewhere will break. I don't care.
     
    Andy Dingley, Mar 4, 2005
    #4
  5. OT Re: single or multiple CSS files

    On Thu, 03 Mar 2005 22:03:50 +0100, Lauri Raittila wrote:

    > in alt.html, Carolyn Marenger wrote:
    >> Hey everyone, I am looking for your thoughts and opinions.

    >
    > Also in ciwas. Don't multipost. See my reply there. It is not perfect, as
    > I stopped writing it on moment I saw this.


    Yes it was. Sorry to offend you. I did see the reply there, and you had
    some valid points, which I will reply to there. I am new to these two
    newsgroups, but not to newsgroups. The others I frequent, don't object to
    crossposting - when the topic is relevant to both (or all) newsgroups.
    CSS being related to HTML, I followed that guideline. I will keep your
    preference in mind next time.

    Carolyn
     
    Carolyn Marenger, Mar 4, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Holger (David) Wagner
    Replies:
    2
    Views:
    1,981
    Holger (David) Wagner
    Jul 3, 2004
  2. =?Utf-8?B?anNhbGU=?=

    ASP.NET multiple users/ single class files

    =?Utf-8?B?anNhbGU=?=, Dec 8, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    3,437
    Hans Kesting
    Dec 9, 2004
  3. Replies:
    4
    Views:
    1,002
    M.E.Farmer
    Feb 13, 2005
  4. Philip Gray
    Replies:
    0
    Views:
    187
    Philip Gray
    Aug 25, 2005
  5. ela
    Replies:
    12
    Views:
    383
    Uri Guttman
    Apr 6, 2009
Loading...

Share This Page