CSS code not working only when website is live

拜拜、爱过 提交于 2019-12-24 08:04:01

问题


I'm working on my website, matthewbellanalytics.com, and I have been trying to make some changes to the contact.css CSS of the contact page. I edited the CSS file and the changes that I was seeing offline weren't reflected online.

Specifically, I changed the background-color:blue, which worked offline as seen here:

I then replaced that file on my hostgator server and I double checked that it was replaced correctly by re-downloading the CSS file from my cPanel.

background-color:blue was definitely still part of the code.

But when I view the website online. background-color:blue, is mysteriously not part of the CSS file anymore.

I assumed this must be a caching issue so I cleared the cache on both firefox and chrome, but still no luck. I then tried opening the website on Opera which I haven't done before so there should be no cache. No luck.

The online page still isn't updating to blue, and looks like this:


回答1:


Check the css file path. In server the path might vary.




回答2:


I was able to solve it in chrome, but not firefox, by going into the developer tools and disabling the cache from there under the "network" tab. No other method of clearing cache seems to work.



来源:https://stackoverflow.com/questions/55114208/css-code-not-working-only-when-website-is-live

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!