• Sign In

Technology??

A site for testing the new tools I'm building, and a little talk about what I'm learning on the way.

  • Home
  • TechnologyView my occasional technology posts.
  • Life
  • Contact
« Comments on One of the reasons I live in...
Comments on Javascript Transition Effect... »

Comments on Internet Explorer CSS File Size Limit

africa » gambia » fajara
910 days, 8 hours, 49 minutes ago
Profile Image
Lamin Barrow
Comments on Internet Explorer CSS File Size Limit Write Reply
Ops!! That does not sound very good for us. But am am sure you'll find a way around it.
771 days, 22 hours, 39 minutes ago
Profile Image
PlNG
Comments on Internet Explorer CSS File Size Limit Write Reply
I went to try and test this, and I must have done it wrong.
Yet my test yielded yet a different but still important result, so it seems I have encountered yet a third limitation to CSS in IE (first one I read about on the web was @import being 32 max declarations per sheet and nested 3 deep max, 2nd is this one).
I'm not sure if this is specific to the situation, but it seems like IE will only allow a selector to be declared 4096 times (or 1024*4)
I did the test by declaring "#i{color:#000000;}" and incrementing color by 20 for each line to account for each character / byte [Windows CRLF is 2 characters]. I then made a test element with the same ID on the test page, and placed an onload alert event pointing to a function that returns document.getElementById("i").currentStyle.color;
Thinking about this while I typed this comment, my stylesheet is extremely sparse and hits 80k. Perhaps you too hit the 4096 declarations limit?
744 days, 11 hours, 8 minutes ago
Profile Image
Marco J Rossi
Comments on Internet Explorer CSS File Size Limit Write Reply
I agree. I read in the MSDN website that when adding CSS rules in a style object by JavaScript, after the 4096th rule, Internet Explorer will display and exception error and the should-be-added rule will not be added. I think that is the reason why some web developers thought that there is a file size limit on a CSS file -- I would rather test later with more than 300k CSS file and just about a hundred rules, so that I could find out if there is no really a file size limit in a CSS file.

Furthermore, I had just tested having more than 32 styles in a web page and have it viewed in IE; only the first 32 are processed by the browser. The rest are ignored. So is the @import. Firefox and other browsers do not have such limits.

That's why I hate Internet Explorer. I love Firefox (hope this is not a spam).
342 days, 12 hours, 4 minutes ago
Profile Image
Purple Scissor
Comments on Internet Explorer CSS File Size Limit Write Reply
I have been having trouble where the CSS is fine and works in FireFox, but when changed does not work in IE8 (I was taking styles out of the page and putting them in a css file). But renaming the file on the hard drive, then naming it back to the original caused it to work in IE. This seemed to be a problem where even deleting the cache, using f5, and rebooting did not work, but making the file appear different did.
337 days, 21 hours, 20 minutes ago
Profile Image
Jesus
Comments on Internet Explorer CSS File Size Limit Write Reply
*#&@ you and your IE
295 days, 12 hours, 33 minutes ago
Profile Image
Joshua Perina
Comments on Internet Explorer CSS File Size Limit Write Reply
Hey "Jesus", see my other post entitled Chrome - It really is a better browser.
84 days, 7 hours, 45 minutes ago
Profile Image
Joe Gakenheimer
Comments on Internet Explorer CSS File Size Limit Write Reply
There is no reason to have such a large CSS document, unless you like to type a lot and like to have contradicting style attributes. I typically have a base file, with structural information, a general style across the entire site, then individual css files for each HTML document - sometimes reusing other CSS documents from other pages. This makes my CSS scalable and manageable and easy to find things.

Comments

Comment features can not be used on discussion display pages. Users should contribute to the discussion rather than comment on it.

Note to website administrator: This comment box should be removed.
Related Topics
css, ie6, ie7, site designer
Provided By
Lamin Barrow
Media Actions
0
Promote
Email to a friend
Inquire
Save to delicious
Digg this
Stumble it
See Also

Try Lara

Build your own website with Lara.  A powerful content management system with easy and fun to use design tools. 

Visit http://getlara.com to learn more.

Go here for a good Javascript Html Editor.

Subscribe Now

Recent Posts

  • VGA Planets "Nu" - The official VGA Planets remake
  • Sending Email from Amazon EC2
  • Using SSL (https) with Mono HTTPListener
  • .NET MimeTypes Class in C#
  • Great WordPress Plugins
  • Flash IO Error #2038 when Uploading Files in .NET
  • Javascript DOM Ready for SSL in IE
  • Javascript Replace All with Variable
  • New Projects for 2009 with News Statistics and Analysis
  • Google Chrome - it really is a better browser
Website created with Lara by Geographical Media