|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (5 bit)
Join Date: Mar 2002
Posts: 26
|
CSS file size problems in IE6 and IE7
I've been experiencing a weird css issue in IE6 and IE7 the past few days and I was finally able to get some closure. The problem is that my company uses rather large css files for the whole website rather than creating smaller css files per application. Over the period of several years, our main css file has ballooned to about 214KB with close to 3400 lines of css! I know this is insane but this file has probably been around since the company first started the website over 10 years ago.
Anyway, I made some recent additions to the file for a new project and I noticed that certain styles were not getting picked in IE6 and IE7. Firefox and Safari worked fine. Logically, it didn't make any sense so I cut out this new css and added to our other main css file (we have two main css files) that is about half the size. This seemed to resolve the issue. I have looked online and I haven't found anything concrete about file size limitations in IE. Some people have mentioned limitations on @imports within a css file in IE. Does anyone know if IE6 and IE7 place a file size limit and/or a limit on the number of lines in a css file? Is there any official documentation regarding this issue? Thanks! |
|
|
|
|
|
#2 |
|
Barefoot on the Moon!
Staff
Premium Member
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,285
|
There is a limit to the number of CSS files you can include, but as far as I'm aware, I've never heard of a size or line count limitation. Remember, CSS files are just text files.
There is, however, a selector limit of what looks to be 4095 selectors. The solution appears to break things up into separate files. If you can't do that, it looks like you may have to refactor some CSS code.
__________________
There are two secrets to staying young, being happy, and achieving success. You have to laugh and find humor every day, and you have to have a dream.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|