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
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: