Coffeehouse Post

Single Post Permalink

View Thread: Printing troubles in IE6
  • User profile image

    Let's give this a shot.  Hopefully Channel9 won't munge up the HTML too much.

    <DIV style="WIDTH: 100%; HEIGHT: 100%; BACKGROUND-COLOR: #ffffc0">
    <SPAN style="WIDTH: 100%; HEIGHT: 100%; POSITION: absolute;">
    <SPAN ID=FRAME style="WIDTH: 100%; HEIGHT:375px; POSITION: absolute;">
    <IMG style="WIDTH: 100%; HEIGHT: 100%; POSITION: absolute;" src="...">

    OK.  The image itself should be 1500 pixels wide by 750 pixels tall, for purposes of this example.  Give it a black border so you can clearly see what's going on.

    The fact that there's a DIV, SPAN, and another SPAN there is due to supporting code-- stuff which handles rendering markups, etc.  It expects a certain structure, and I can't toss that away.

    The SPAN ID'd as FRAME frames the image (duh?).  I can use this or the image style itself to control the size of the image. 

    If you fill in the image and try printing (at least with "letter"-sized paper-- 8.5" by 11"), the resulting image aspect ration will be skewed.  On screen, the image is 2:1.  On paper, it's more like 2.09677:1.

    If I specify 50% height for the FRAME span, then the image is stretched to 50% of the paper or window height.

    It's also worth noting that I have no control over the dimensions of the paper media-- it could be letter, but it could also be legal, or A4, or whathaveyou.