Hacker News new | past | comments | ask | show | jobs | submit login

position: fixed is if you actually want the footer to always be visible, with the main body content scrolling out from under it. To my knowledge, this works across all devices.

The goal of this snippet is to have the footer always below the content, but in the event the content is shorter than the page height, the footer should still be placed at the bottom of the page.

Really Javascript isn't a terrible solution here, since it only needs to be run on load and on window resize (rare events), but the CSS is indeed nifty and worth knowing it exists.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: