Sticky Footer
philipwalton.github.io
philipwalton.github.io
One nit: This isn't a "sticky" footer, and that's a good thing. I'd just call this a "bottom footer" for lack of a better term.
Sticky is used to describe an element that starts with a non-fixed (non-overlaying) position such as position:static and switches to a fixed (overlaying) position to stay visible on screen during scrolling.
https://developer.mozilla.org/en-US/docs/Web/CSS/position#st...
This is: The footer is placed at the bottom of the window or the bottom of the body, whichever is _lower_.
Sticky would be: The footer is placed at the bottom of the window or the bottom of the body, whichever is _higher_.
Maybe I'm introducing more confusion here, but wouldn't the term for this be "fixed"? I.e. it's fixed to the bottom of the page, regardless of the size of the window.
"Sticky" is like a conditional/hybrid between "fixed" and "relative".
I mean, I call this kind of footer "sticky" but it's not a great name and I can't think of anything better.
I understand the point you’re arguing but at some point the thing something is called becomes it’s name.
If you want a name for your concept I’d call this a fixed-positioned footer which is explicit that it’s position is permanently fixed and won’t change. It also correlates with position: fixed.
tl;dr You’re concept of a sticky footer is different than the rest of the web development community so it’s important to realize that and not correct someone for being correct.
Then this happened:
https://trends.google.com/trends/explore?date=all&q=sticky%2...
The popular usage of "sticky headers" had the opposite meaning of "sticky" compared to "sticky footers." The usage of this word to refer to the header behavior won out and was formalized as position:sticky in CSS3 Layout.
The problem now is when people use "sticky footer" in the former sense, it's misinterpreted. Note the other comments on this story.
min-height: 100vh
as part of achieving its effect. height = a.height + b.height - 2*c.height :root {
--header-height: 5em;
--container-height: 25em;
--other-height: 2.5em;
}
div {
height: calc(var(--container-height) - var(--header-height) + (var(--other-height)*2));
}Can CSS calc() be used with dynamic widths or heights of other elements?
old_man_yells_at_cloud.jpg
The code: https://github.com/philipwalton/solved-by-flexbox/blob/maste...
It've been great if he'd hooked up the page with caniuse to determine the best css to use for a individual's use case. See also his own flexbugs (https://github.com/philipwalton/flexbugs), which ironically is linked directly from caniuse's 'known issues'.
https://alisdair.mcdiarmid.org/kill-sticky-headers/
Please just stop using stickys. They are annoying. Thanks.
Still wouldn't downvote