by troels · 13y ago · 0 comments
What you meant to say seems to be "at the bottom of the screen", which prompts more questions than answers.
Then again, maybe I'm misunderstanding your intentions entirely, since you state that your naïve solution was to use position:absolute. But then in the next paragraph, you talk about position:fixed. Was the absolute-part a typo?
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.