5 ms·
Thanks for sharing this. Some folks are still using JavaScript for this, and it's unnecessary. One nit: This isn't a "sticky" footer, and that's a good thing
by m0dest 7y ago
Thanks for sharing this. Some folks are still using JavaScript for this, and it's unnecessary.
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#sticky 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_.
- hnarn 7y ago> I'd just call this a "bottom footer" for lack of a better term. 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.
- deleted 7y ago[deleted]
- gwillz 7y agoWell no, "fixed" is a position relative to the the viewport. "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.
- deleted 7y ago[deleted]
- whalesalad 7y agoFWIW most people have called this a sticky footer since the dawn of Web 2.0. Go back ten years and you’ll find posts describing the sticky footer that should be at the end of the content (if the content goes below the fold) or the bottom of the browser window, if the content doesn’t push the footer there. 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.
- pg_is_a_butt 7y agoFWIW most people are dum
- m0dest 7y agoI get where you're coming from. I was around then too. :) Then this happened: https://trends.google.com/trends/explore?date=all&q=sticky%20header,sticky%20footer 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.