Preventing other elements from crashing into a fixed footer
See original GitHub issueI have a document that has a fixed footer on all pages, but elements before the footer sometimes crash or overlap into it. This is because such elements can only wrap when it is calculated that they can’t make the rest of the page without the height of the footer being taken into consideration.
<Document>
<Page size={{ height: 472 }}>
<View height={410}></View> // element won't wrap because it's height is not up to the page and crashes into the absolutely fixed footer below
<View height={72} style={{ position: 'absolute', bottom: 0, left: 0, right: 0 }}></View> // fixed footer
</Page>
</Document>
I could use the break
prop for such elements but there is no way to dynamically determine when to apply it.
Is there a way to prevent this from happening?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top Results From Across the Web
Preventing fixed footer from overlapping content
The problem is that fixed position takes it out of document flow. You can add margin-bottom to the body content equal to the...
Read more >HOW to keep your FOOTER at the bottom of the page with CSS
I explain how to keep your footer element stuck to the bottom of the page with CSS. The problem occurs when you have...
Read more >How to Stop Word from Crashing! - 24 Hour Company
1) Check the Header/Footer First. Headers and footers are awesome because every page references only one set of text or images. · 2)...
Read more >How to keep your footer where it belongs ? - freeCodeCamp
For a quick fix, you can absolutely position the footer at the bottom of the page. But this comes with its own downside....
Read more >The box model - Learn web development | MDN
Padding, margin and border will cause other elements to be pushed away from the box. The box will extend in the inline direction...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For anyone with a similar situation, I had to give the
Page
a padding-bottom higher than the height of the footer.I have the same issue but the padding-bottom doesnt work for me. The elements before the fixed footer still remain overlaping. Is there another way to prevent this?