Isaac Vallee Isaac Vallee - 3 years ago 195
CSS Question

MVC3 Web App - IIS7 Windows Server 2008 R2 - CSS issues

I am developing a MVC3 Web Application with Visual Studio 2010 Ultimate.

During development on my pc in IISExpress, everything looks as it should when viewed using IE8 and Chrome.

http://localhost:7442/

Yesterday I deployed to a Windows Server 2008 R2 environment with IIS7.

When I view the web app on the server via IE8, everything looks as it should.

http://localhost:8080

When I view the web app remotely from my pc in IE8, it seems that some of the css is messed up. Text placement is skewed, some colors are messed up, etc.

http://[servername]:8080

But when I view the web app remotely from my pc using Chrome, everything looks fine...

http://[servername]:8080

Any idea how the same site using the same files can look differently using the same browser just in different environments?

Answer Source

Turn off (or on) Compatibility View (given it works in Chrome then i'd think on). IE, by default, sets compatibility view for sites that are on the local network.

As you mention, you can also turn this on/off in the browser settings, but if you want it to default to standards mode always, then you need to either use the x-ua-compatibile meta tag, or set the x-ua-compatible header in global.asax

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download