Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails - CSS not loaded in internet explorer

I've been struggling for weeks trying to fix this problem, but I haven't found the solution. My webpage works great on both Chrome and Firefox, but not on all versions of internet explorer. Apparently, there were many questions complaining about the same issue but I still haven't solved my problem after trying all the known solutions. Here is some info for you.

  1. The webpage(application) is based on Ruby on Rails.
  2. I have few enough css files; they don't exceed the "31-limit"
  3. On top of page, I define <!DOCTYPE HTML>
  4. Passes the W3C validation

The stylesheet, posts.css.scss contains..

body {
    background-color: #000000;
    color: #FFF;
}

and even this simple styling is not applied when someone views the webpage via internext explorer.

I've been using Firebug and Chrome debugging tools to find the source of problem, but haven't come up with success yet. I'd appreciate any help for this.

like image 528
Maximus S Avatar asked Dec 18 '12 06:12

Maximus S


1 Answers

You are indeed over the 4096 selector per file limit for IE. You are at 5775 according to CSS: Selector Counter. It appears that others have used this solution to get around the 4096 selector limitations: ChristianPeters CSS Split tool for IE 4096 Limit.

Another tool that appears to be a little more formal and documented: CSSSplitter

Let me know if one of these does the job.

like image 73
Sean Keating Avatar answered Nov 15 '22 04:11

Sean Keating