Forum Moderators: not2easy

Message Too Old, No Replies

ie7 print bug with position:absolute

         

josefK

4:17 pm on Jul 30, 2007 (gmt 0)

10+ Year Member



Hi there,

I have a website with content first in the actual html code, and the header last, which is then repositioned absolutely to the top of the browser window, while the content is offset down to appear following the header. All is hunky dorey.

Now print a multipage document in IE6, FF, etc. Fine: the header is positioned to the top of the first printed page.

Now IE7: the header is positioned absolutely to the top of the last page printed. Aaargh. So it overlaps content, and leaves a blank space on the first page where it should have gone.

Any clever suggestions to overcome this?

I do have a print friendly page, which uses html in the order: header - content. But it would be nice just to use a print.css file, as it seems users still will print the webpage, rather than use the printer friendly page. And why shouldn't they?

Marshall

7:48 pm on Jul 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What is the reason you put the header last? If you search WebmasterWorld, there was another thread about this (putting header last - reposition with CSS) and the consensus was it is not wise to do. So my suggestion is put the header where it belongs and your problem is solved.

Marshall

londrum

7:59 pm on Aug 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



i've you've got something similar to this, then it should work

#header { position:absolute; top:0; left:0; }

you must have something else in there that's messing it up.
post some of your css on here then we can see what's up with it

Xapti

11:17 pm on Aug 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sounds like a bug in the way it prints a page. Since the code of the header is at the end, it probably considers each page as a new canvas for positioning, so puts it on the top of the last page.

As mentioned, it's silly to have the header not at the beginning of the page anyways... just put it at the top and remove the postitioning.