开发者

Weirdest IE8 Printing issue ever!

We have two s开发者_C百科ervers, 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.


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜