SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: 2 css files

Hybrid View

  1. #1
    cd /pub; more beer diacono's Avatar
    Join Date
    Dec 2000
    Location
    Horsham, West Sussex, UK
    Posts
    277
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    2 css files

    just wondering how would u guys do this...
    i've got a site which sometimes uses a 2 column layout and sometimes a 3 column.

    so what i did was create 2 css files which are identical expect 4 1 line. it seems a waste of bandwith for a viewer to load a new css file (5kb) just for 1 line of code that is different?

    how would you this?
    example
    DIEGO MOORE

  2. #2
    1-800-JMULDER JMulder's Avatar
    Join Date
    May 2001
    Location
    The Netherlands
    Posts
    1,745
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would use one CSS file and then use classes/spans to apply the style that's in that 1 extra line.
    Jeroen Mulder

    w: www.jeroenmulder.com

  3. #3
    SitePoint Zealot techie2003's Avatar
    Join Date
    May 2001
    Location
    Boston, Massachusetts
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't understand why you can't just use 1 file.
    My computer: Dell Latitude CPx | P3 650/500 w/ 256 MB RAM | 15" 1024x768 | IE 5.5 DSL
    gO rEd SoX! | "The greatest thing you'll ever learn is just to love and be loved in return" - Christian, Moulin Rouge
    l e a r n t o q u e s t i o n | c l i o 3 6 0

  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yup...just name the odd style something totally different and reference it when you need it.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  5. #5
    cd /pub; more beer diacono's Avatar
    Join Date
    Dec 2000
    Location
    Horsham, West Sussex, UK
    Posts
    277
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by creole
    yup...just name the odd style something totally different and reference it when you need it.
    but then the whole point was to save those precious 5kb...
    the user would be loading two diferent css files while navigating the site.

    maybe its just me being to fuzzy about 5kb
    DIEGO MOORE

  6. #6
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Depends. Some people have a 'default' style sheet whereby every file will be loading this.

    Then others might have a css file for only files in this folder...say...articles.

    And in this file..contains all the span...divs etc. for that category only. its stupid to put it together with the default style sheet as all your other files owuld be loading the styles which they won't use at all.

    get what i mean?
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein


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
  •