-
-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Absolutely positioned element at the bottom without fixed height disappears below page #1626
Comments
Hi! First of all, thanks a lot for testing 55.0b1 and for reporting this bug. The bug is now fixed and tested, your example works correctly. Don’t hesitate to report other bugs you may encounter! |
Hi @liZe! I am using the current version #footer {
height: 3cm;
bottom: -4cm;
left: 0;
position: fixed;
width: 100%;
font-size: 8px;
} Every page looks good except the last one (or the first, if there is only one. There, only the first line of content is shown, the rest ist hidden. I "debugged" it a little with coloring the elements and the element has the correct height so there is no hidden overlay etc. Any ideas what I can do about it? Thx ❤️ |
It’s not a bug, it’s a feature 😁️: absolutely positioned elements are now split between pages. If you want to avoid this, you can use #footer {
bottom: 0;
transform: translate(0, -4cm);
} |
Hi @liZe - Why is it a feature that the footer looks good on every page except the last one? 😆 I mean, it's literaly being cut of in the middle. It looks very much like a rendering problem 😅 Nevertheless, thx for the fix! I actually built a fancy workaround (which I cannot show anybody 🙈 ) so I found my way around it...with creating one page more and cutting it off with PyPDF2. |
That would be long to explain, but you can read the specifications if you’re really interested 😁️. Splitting absolute elements between pages displays the end of the element on the next page. On the last page, there’s no next page (because only the elements of the flow can create new pages), so the block is cut and the end is never displayed. You can try to put an absolute element at the bottom of a page and display it on a browser, it will be cut too. |
Ok, thx for the explanation! Never knew about that! |
I spotted a bug with the new beta version regarding the position of absolutely positioned elements at the end of a page. The bug only occurs, when the element has a height of auto.
WeasyPrint Version: 55.0b1
Code to reproduce:
Expected behaviour (working as of v54.3): The yellow box is displayed completely at the bottom of the page, screenshot: https://share.getcloudapp.com/7KuQZlxJ
Actual behaviour (v55.0b1): The yellow box is cut off and disappears into the void, screenshot: https://share.getcloudapp.com/2Nuz8ekB
The text was updated successfully, but these errors were encountered: