Closed
Bug 242606
Opened 20 years ago
Closed 20 years ago
Printing pages with absolute DIV positioning does not take vertical margins into account.
Categories
(Core :: Printing: Output, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 154892
People
(Reporter: djpeaco, Unassigned)
References
Details
Attachments
(1 file)
844 bytes,
text/html
|
Details |
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a) Gecko/20040504 When printing documents that use CSS to position DIVs absolutely, the size of the page does not take into account the top and bottom margins when computing the size of the "page". I defined a DIV called footer to have the following properties: #footer { position: absolute; width: 100%; bottom: 0in; } This is correctly positioned in the browser, and if I set the top an bottom print margins to 0, it is also positioned correctly. However, if I set a top margin of 1 inch, the whole layout shifts down one inch. The effective height used to calculate the absolute position stays the same, so my footer div gets pushed partly off the bottom of the page. This isn't the correct behavior is it? Reproducible: Always Steps to Reproduce: 1.Load my attached page 2.File -> Page Setup. Set top margin to 1 3.Print or print preview. Actual Results: Footer div gets pushed off the bottom of the page. Expected Results: Expected it to align the bottom of my footer div with the top of the bottom print margin. I also tried using media specific css sheets (@media print) but this did not change anything. Changing the bottom print margin also had no effect on the positioning of the footer div. Aligning to the left, right, and top of the "page" all appear to work fine (they align relative to the margins), it is just aligning to the bottom of the "page" that has problems. I just noticed that this works as expected when using fixed positioning instead of absolute positioning, so that is a partial work around except that fixed positioning repeats the div on every page, while absolute positioning only applies to ... actually I'm not quite sure what it should apply to, now that I think about it.
Reporter | ||
Comment 1•20 years ago
|
||
Comment 2•20 years ago
|
||
*** Bug 250336 has been marked as a duplicate of this bug. ***
Comment 3•20 years ago
|
||
dup of bug 154892 *** This bug has been marked as a duplicate of 154892 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•