Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS not working in Chrome

The CSS is not loading for this page of the website I am working on: http://www.thesanfordcenter.net/sanford-center. It happens only in Chrome, but is not a caching issue as the same problem is happening in Chrome on another computer and I have cleared all browsing and cache history in my browser.

It does seem to be working correctly in FF and IE. The sub pages on this site, which use a different template seem to be working fine.

I am not sure what it is that is causing this. Any help would be appreciated.

like image 709
Phorden Avatar asked Jul 25 '13 20:07

Phorden


People also ask

Why is my CSS not working in Chrome?

Make sure that your CSS and HTM/HTML files use the same encoding ! If your HTM/HTML files are encoded as UNICODE, your stylesheet has to be as well. IE and Edge are not fussy : stylesheets are rendered regardless of the encodings. But Chrome is totally intolerant of unmatched encodings.

How do I fix CSS not working?

Regenerating CSS: This can easily be fixed by going to WP admin > Elementor > Tools > Regenerate CSS. Then, you can clear the cache (WP cache and browser cache) and refresh the page. Clearing Site Cache: Check if you have any caching plugins on your site or any server level caching enabled. Clear those caches.

Why is my CSS styling not working?

Make sure that you add the rel attribute to the link tag When you add an external CSS file to your HTML document, you need to add the rel="stylesheet" attribute to the <link> tag to make it work. If you omit the rel attribute from the <link> tag then the style won't be applied to the page.


2 Answers

In Google Chrome

>> goto settings
>> search for cache
>> clear browsing data
>> check cached images and files (the past hour / day)
>> clear browsing data

and goto your webpage and press "Ctrl + r"

Hope this solves your issue Cheers.

like image 189
Shyam Avatar answered Oct 18 '22 23:10

Shyam


Make sure that your CSS and HTM/HTML files use the same encoding !

If your HTM/HTML files are encoded as UNICODE, your stylesheet has to be as well.

IE and Edge are not fussy : stylesheets are rendered regardless of the encodings. But Chrome is totally intolerant of unmatched encodings.

I tried every solution/suggestion i could find all over the Internet before i noticed, in my text editor, that i was using different encodings. Once I saved the stylesheets with the same encoding used for the web pages, the problem disappeared.

like image 28
Bluez Avatar answered Oct 19 '22 00:10

Bluez