Local website renders differently using (IP address or machine name) vs localhost?

后端 未结 4 1120
夕颜
夕颜 2020-12-15 09:49

I have an MVC3 (razor) site published to IIS7 locally for testing purposes.

When I access the site via \"localhost\" it looks different from when I access using the

4条回答
  •  孤街浪徒
    2020-12-15 10:12

    The same css file is used for every page, and F12 in IE8 shows the correct css has been loaded.

    Developer Tools should show that IE is not using the same "Browser Mode"/"Document Mode" between the two instances of the site, because that's the problem here. IE defaults to different modes depending on if you're using a machine name or not (amongst other things).

    Adding this to your should sort out the problem:

    
    

提交回复
热议问题