sticky-footer

Position footer at bottom of page having fixed header

社会主义新天地 提交于 2019-11-25 22:04:58
I want to position the footer at the bottom of the page which having a fixed header also... Not with position: fixed - I don't want it to remain on the screen, it should just be at the end of the page and behave normally when scrolling. Not at the bottom of the visible screen - At the bottom of the page , i.e; after all other content. Here's a diagram to explain better: Here's the code: I have prepared a demo: JSFiddle Or see below <div id="header">Header</div> <div id="content"> <p>Some content...</p> </div> <div id="footer">Footer</div> body{ /* Just to enable scrolling in JSFiddle */ height

How do you get the footer to stay at the bottom of a Web page?

末鹿安然 提交于 2019-11-25 21:35:16
问题 I have a simple 2-column layout with a footer that clears both the right and left div in my markup. My problem is that I can\'t get the footer to stay at the bottom of the page in all browsers. It works if the content pushes the footer down, but that\'s not always the case. Update: It\'s not working properly in Firefox. I\'m seeing a strip of background color below the footer when there\'s not enough content on the page to push the footer all the way down to the bottom of the browser window.