css - UI looks different in localhost and hosted website(GoDaddy) -


i hosted asp.net mvc website in godaddy, appearance looks little bit different. navigation bar black (the default of mvc 5), turns blue. , background image not showing. cause if this? please help. thank you. tried background image:

background-image: url('image/bg30.png'); ---this 1 works in localhost, not in hosted website

background-image: url('/content/image/bg30.png'); ------also works in localhost, not in hosted website

background-image: url('../image/bg30.png'); --- 1 doesn't work in both

your reference images in css file must relevant css file's location. might idea use absolute paths instead of relative paths. this article offers explanation of when , why use absolute paths.

relative: /content/images/bg30.png

absolute: http://www.example.com/content/images/bg30.png

example:

css file: example.com/content/styles.css

bg image file: example.com/content/images/bg30.png

background-image: url('images/bg30.png'); work because / , ../ move path root , 1 level respectively. background-image: url('images/bg30.png'); work regardless of correlation between location of 2 files.

it seems if hosted approot path differs local path. using absolute path css file , absolute paths images (within css file), can solve confusion location of files.

you should make sure you're uploading all proper files (images included) proper location on hosted site. make sure you're overwriting existing files correct versions local path, cause of color issue.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -