User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1a1pre) Gecko/2008060905 Minefield/3.1a1pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1a1pre) Gecko/2008060905 Minefield/3.1a1pre On a page with background divs (z-index of 9) behind a content div (z-index of 15) the background divs cover up the content div when looking at print preview or the page print out. When the page is displayed with the same css in the browser, everything comes across correctly. Oddly, sometimes changing the Scale on the print preview can resolve this. Reproducible: Always Steps to Reproduce: 1. Create page with background divs positioned behind content div. 2. Fill content div with quite a bit of data. 3. Click File -> Print Preview Actual Results: Background divs cover up the content div. Expected Results: Background divs should be behind the content div, as it looks in the actual browser. Also, absolute positioned divs don't show up after the first page in the print.
Created attachment 324293 [details] HTML with background divs in print media This is html that has background divs that should show behind the content div. Background divs only shown on "print" media. Need to click File -> Print Preview to see the background divs cover up the content div.
Created attachment 324294 [details] HTML with background divs in "all" media This html shows how the page should look on the print. It is the same as the other page, but the stylesheet was set to use media="all". In this example, you can see that the background divs are behind the content, but when you go to print the page, they will then cover the content.
The second issue brought up here appears to match <a href="show_bug.cgi?id=407789" title="Absolutely positioned elements do not print after first page">Bug 407789</a>
Oddly, everything seems to work when the print preview fits into one page. Once things spill over into a second page the z-index problems begin to arise.
Does this work in version 3.6? If it does work, please close the bug and set resolution to WORKSFORME. If it does not work, please update the bug. (generally speaking, printing is greatly improved in v3.5 and v3.6)
Just tried it with 3.6, and the problem still exists.
Elika, any idea what's up here?
Created attachment 456938 [details] reduced testcase Reduced testcase. Variants that don't fail: - As Jeremy astutely noticed, reducing the testcase to one page (e.g. reducing 'height' to 7in) - Swapping the height onto <body> so that #fg does not continue - Swapping the height onto a block child of #fg and giving #fg a short height so that its continuation is an overflow container. Somehow, the fact that #fg has a real continuation is causing the abspos #bg after it to paint at the wrong stacking level. Don't have any theories as to why.