开发者

CSS applied differently on local vs. remote

开发者 https://www.devze.com 2023-04-06 18:13 出处:网络
This is a bit of a long shot given how vague my problem is but I\'m at my wit\'s end here. Basically on my local machine, my website looks fine. However, once it\'s deployed to the live server, the C

This is a bit of a long shot given how vague my problem is but I'm at my wit's end here.

Basically on my local machine, my website looks fine. However, once it's deployed to the live server, the CSS is not being applied in the same manner. Some of the overwrites that are happening on my local server are not being replicated on the remote server.

All the CSS files are loading for sure on the remote. Collectstatic command has also been ran.

Has anyone experienced such an issue before? Or does anyone have an guesses as to why this might be happening?

UPDATE I know which style sheets are causing my problem, reset.css and text.css for those familiar with 960.gs. The thing is the overwrites are working in the right order locally but not on t开发者_如何学Gohe remote.


It could be a lot of things, but I've had this happen to me before. It could be related to some virtual directories not being set up properly on your dev machine when compared to the production environment (causing some CSS to not load).

Have you used Firebug to see which CSS files are being loaded? You could use the Web Developer Toolbar in firefox to disable individual style sheets to see which is your culprit.

Are you sure there aren't any embedded styles on the remote server that you don't have locally?

Remember that there is a cascading order of priority for which CSS takes precedence in a browser. See: http://www.w3schools.com/css/css_howto.asp (bottom of page "Multiple Styles Will Cascade into One").

Good luck.


clear cache as well as cookies of your browser and recheck it. sometimes if network is slow , page does not download properly. basically css has to take nothing from the server. It may differ from browser to browser.


By default, Intranet sites are displayed in compatibility view in Internet Explorer.

This setting can be disabled

0

精彩评论

暂无评论...
验证码 换一张
取 消