SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Location
    Poland
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS file size...

    Hello,

    I wonder how long can CSS file be??
    Becouse I have encouraged that after ~3500 lines of CSS code, browsers seem to miss couple of styles... Even when I declare them at the end - they aren't applied...
    Tom.

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I doubt it's the file size itself. With a style sheet that long, it's more likely that you run into specificity problems; that the rules you add at the end are not specific enough, but are overridden by other, more specific, rules.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Location
    Poland
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I even specified exact specific rule for it, and nothing happenes :/
    eg. #container #main #test #test .test
    Maybe I forgot to enclose the rule somewhere "}", is there any tool to check it for me, besides w3c validator?

    [solution found!]
    I had misspelled class that has overwritten my style
    It seems that file size doesn't matter here...
    Last edited by Turek; Oct 18, 2006 at 06:59.
    Tom.

  4. #4
    SitePoint Wizard bronze trophy DaveWoods's Avatar
    Join Date
    Dec 2004
    Location
    Derbyshire - UK
    Posts
    2,651
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you can put the site somewhere online then I'm sure a few people here won't mind taking a look

  5. #5
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Location
    Poland
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Read above
    Thanks for helping...
    Tom.

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,380
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    According to this report 4096 lines of code is the largest in IE.

    http://blog.360.yahoo.com/blog-ktYYK...ryv2QSL0-?p=48

    I couldn't test as it crashed DW and crashed the browser so be very careful

  7. #7
    Chillin like a Villain DaStuff's Avatar
    Join Date
    Jul 2003
    Location
    Huntington Beach
    Posts
    649
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow who would ever need 4k lines of css code

    That seems like there must be a simpler way to get everything out there.
    • Follow the dancing banana

  8. #8
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Location
    Poland
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It seems that someone need that...
    I had to put separate styles from whole portal pages to one file, as the client's cms need it that way...
    But I think the file won't be longer than 4k lines...
    Tom.

  9. #9
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Damn wimpy browser.

  10. #10
    Non-Member Webby007's Avatar
    Join Date
    Sep 2005
    Location
    UK, England
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Well if you ever did reach 4k lines of code, you'd just create another css file and use multiple ones! IE caters for 4k lines of code just to apply hacks to get it to view properly


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
  •