views:

54

answers:

3

We have two servers, a development/test server (Win Server 2008) and a live server (Win Server 2003 SP2). Same ASP.NET code base deployed to both, everything works fine Except when printing on IE 8 using the live server.

The live server prints the content shifted to the right in a larger font size.

I just don't get it! It is worth noting that we are using a specific css file for printing:

<link href="/css/print.css" type="text/css" rel="stylesheet" media="print" />

Both servers are producing identical HTML source. I am not even sure where to start looking for trouble.

+1  A: 

If the HTML is the same then it's probably the HTTP headers that differ. Check them. It may be a MIME-type issue or something like that.

I once had a web browser ignore my CSS file because the server was sending the wrong MIME type for the CSS file.

Artelius
The Content-Type is set correctly to be text/css on both servers
a b
+1  A: 

Check what mode IE8 is using in each case. You can do this using IE8's developer tools (Press F12, it's in the menu bar at the top).

If they are different, this is likely caused byt HTTP headers, as Artelius says.

Colin Pickard
They both have identical Browser modes (IE8)
a b
A: 

It turns out, a body element's width was not set explicitly and for some reasons that triggered the original issue, until I figured that out I have forced IE7 emulation from IIS using http headers.

a b