2 pages are printed instead 1
Reported by
pavel.m...@gmail.com,
Dec 12 2017
|
|||||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
Steps to reproduce the problem:
1. Open the attached HTML in Chromium
2. CTRL+P
3. See that 2 pages are going to print and text "top block" is twice
What is the expected behavior?
Only 1 page should be printed because browser shows just 1 page and text "top block" only once.
What went wrong?
This is the minimal HTML example:
<!DOCTYPE html>
<html lang="en">
<head>
<style>
html,body{
height:100%
}
#topblock {
position: fixed;
}
</style>
</head>
<body>
<div id="topblock">
top block
</div>
<div style="margin-top: 35px;">
body
</div>
</body>
</html>
Did this work before? N/A
Chrome version: 62.0.3202.94 Channel: stable
OS Version:
Flash Version:
Removing anything from used styles makes page print correctly.
,
Dec 12 2017
,
Dec 13 2017
Thanks for the minimal test case. Blink folks who actually understand HTML+CSS layout should take a look.
,
Dec 13 2017
+mstensho, our resident pagination expert.
,
Dec 13 2017
You get two pages because body height is 100% of the initial containing block, plus top and bottom margins. I get two pages in print preview. The fixed-positioned #topblock is printed on every page, as per spec: https://www.w3.org/TR/2011/REC-CSS2-20110607/visuren.html#propdef-position "In the case of the print media type, the box is rendered on every page [...]"
,
Dec 15 2017
I see. Thank you for your explanation. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by sc00335...@techmahindra.com
, Dec 12 2017