Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I investigate a "style sheet could not be loaded" message in Firefox?

Tags:

css

firefox

How do I investigate a "style sheet could not be loaded" message in Firefox? This message appears as a red bar below the page contents and above the developer tools. How do I find out what file the browser is referring to? I'm running version 46.0 on Linux Mint 17.3.

Update

If I look at the console of the developer's tools in Firefox, it shows all the css files and says "HTTP/1.1 200 OK" against each file.

Another Update

This error bar comes and goes, it is not consistent for a particular page.

like image 828
gornvix Avatar asked May 02 '16 18:05

gornvix


People also ask

Why is my external style sheet not working?

Make sure the link tag is at the right place If you put the <link> tag inside another valid header tag like <title> or <script> tag, then the CSS won't work. The external style CAN be put inside the <body> tag, although it's recommended to put it in the <head> tag to load the style before the page content.

How do I enable style sheets?

Select "Preferences..." under the Edit menu. Once the Preferences dialog comes up, select the "Advanced" Category and make sure "Enable style sheets" is checked. Also make sure that you check the "Enable JavaScript" option.

How do I view a CSS file in Firefox?

To view user-agent styles (i.e., browser-default CSS rules), enable “Inspector > Show Browser Styles” under the developer tool settings panel.


1 Answers

This may be a very specific edge case, but I had this exact same error with no indication as to which style sheet Firefox was complaining about. It turns out that it was the Ad Blocker that I was using. When I disabled the ad blocker and reloaded my page, the error went away.

like image 199
Mike Stoddart Avatar answered Nov 11 '22 05:11

Mike Stoddart