Kill Sticky Headers (2013)
alisdair.mcdiarmid.org
alisdair.mcdiarmid.org
Even without that feeling, sticky headers kill the feeling that I'm moving through a viewport of a webpage. It makes your website look like it's not of the "webpage" medium that I've been familiar with for 20 years. Humans have a very good eye for relative movement. The visual processing part of your brain considers movement much more contrasting than color. So a fixed header when you're scrolling at 1cm/second is visually equivalent to a big bar moving upward at 1cm/second while you're trying to read an article. It's hard not to pay attention to it. But navbars don't contain content, so they shouldn't steal attention from the page content.
What's worse, almost no sticky header has any useful items in it. Take StackOverflow as an example. It has a link to the homepage and a searchbar, in spite of the fact that many frequent StackOverflow users have never visited the homepage and never used the built-in search. The top of the screen is the most valuable part, because my head is usually above the screen, so it's more comfortable for my eyes to rest around the top of the viewport. So if you put something there, it had better be important.
Also tables align nicely in a grid, recfiles do not
In a big grid you can't make sense of the cells anyway, so that alignment has no function beyond being just an alignment.
It might be you're overreacting to something it's not really a big deal in general
##header:style(position: absolute !important)
##nav:style(position: absolute !important)Disclaimer: I've never tried it.
It hit me hard, when I saw my user's screen which was relatively small and my sidebar and header were both sticky, leaving only a small area to display the main content.
I've now gone back to mostly non-sticky elements. It's refreshing. Not seeing those "frequently accessed" elements isn't much of an issue. I don't think I ever complained about popular websites not having its header sticky.
Letting users focus on the main content has been by far the most beneficial thing from my perspective.
As a user of a laptop with a small screen, I can say that, at least where I'm concerned, making those "frequently accessed" elements sticky is a great way to ensure I won't access them that much. I don't much go for non-enjoyable reading experiences. So I'm either going to hit the reader button to make the header disappear from my life, or, if that's not an option, I'm going to read what I came for and then go somewhere more fun.
I think part of the issue is, educationally, people gets told that sticky headers and huge font-size or white space is good design. In reality, they are just chasing away people from their websites.
Webdesign trends are so hostile towards users...
Web design is the problem.
(In fairness: 99% of Web designers give the other 1% a bad reputation.)
As far as I can remember, the _only_ app I've ever seen get this exactly right (in terms of not ever obscuring text) is the New York Times' Android app.
It's no wonder my girlfriend makes more than I do as a UX professional. Someone on the team that actually has the users' interest at heart is critical. Else you get these ridiculous break-room ideas that nobody spent more than 5 seconds thinking about.
Websites just show it on scroll-up no matter how you do it, so annoying.
th { position: sticky; top: 0; }
I don't think it would have been reasonable to include/force such functionality at the spec level.
[...document.querySelectorAll("*")].filter(el => getComputedStyle(el).position === "fixed").forEach(el => el.parentNode.removeChild(el));
The code above also works, you can add the URL below to bookmarks. javascript:[...document.querySelectorAll("*")].filter(el%20=>%20getComputedStyle(el).position%20===%20"fixed").forEach(el%20=>%20el.parentNode.removeChild(el));
Also, for people who uses Safari:You can add javascript: links to your bookmark by adding any bookmark & changing the URL.
So I did this:
javascript:(function()%7B(function () %7Bvar i%2C elements %3D document.querySelectorAll('body *')%3Bfor (i %3D 0%3B i < elements.length%3B i%2B%2B) %7Bif (getComputedStyle(elements%5Bi%5D).position %3D%3D%3D 'fixed' || elements%5Bi%5D.className %3D%3D%3D 'awsui-flashbar') %7Belements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D)%3B%7D%7D%7D)()%7D)()
To add the flashbar from AWS to the mix, how would I do that with the streams like this? I'm sure if I hunt a bit I'll figure it out.https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/r...
Sticky navigation on phones is not OK, but I actually like when the nav pops down when I scroll back up. A "peek-a-boo" nav, if you will.
The ideal hiding navbar is one which is the only one on the screen and one which only pops down as much as the user scrolls so you have to scroll up one navbars worth to get the full thing and not the ones where you scroll up 1 px by accident and the full navbar flys down
sticky has been around since at least 2014
Also "relatively new" is still accurate in web terms, which has specifications dating to the 90s.
>Also "relatively new" is still accurate in web terms, which has specifications dating to the 90s.
The majority of web features are relatively new under this definition.
I think the two of us just disagree on how spans of time should be labelled.
@media (max-height: 700px) {
.My-Sticky-Header-Selector {
position: absolute;
}
}Eg. see the sticky headers in the mobile Google Calendar app (on Android at least).
Even in this very article, which self-referentially demonstrates how a sticky header gets in the way, there are sizeable margins on both sides of the text (something I'm personally not very fond of, but I digress).
Now, the sticky header, should it contain any useful information, could very well be moved to one of these empty areas, without obscuring the text, without disrupting the scrolling experience etc.
Really? I find having text flow to the full width of the browser to be harder to read. I think there should be some limit.
But I do like your idea of using that empty space when the browser is wide enough to make it available.
But this website - on my 24" monitor - uses merely 35%; 900 out of 2560px. You (should) know you've gone over the top when the margins end up taking twice as much space as the actual content. What a waste of screen estate, what's the point of a wide monitor then?
That's why the user has to scroll constantly, and we can't read a text comprised of just several paragraphs without taking our finger off the mouse wheel anymore. It's like printing newspapers on till rolls
This may sound like the same thing but it's not. It doesn't matter what percent of the page is taken up by margins, so long as the physical line length vs. font size is comfortable to read. Too long and it's harder to follow, too short and, as you say, you have to scroll constantly. If you had the same physical text width but a smaller font, it'd be better (so long as the font was still big enough to read comfortably).
Classical research suggests the ideal line length is somewhere between 45 to 75 characters. For the web it's suggested you can go up to 85 characters, depending on the font. This website sets the maximum width at 36.5em which is on the narrow side of things.
there's a more advanced version of this that is an extension. it offers a fixed delay, adjustable per site. so you can nuke slide-overs and html5 popups as well. it isn't perfect but it's still a useful tool. sorry i don't have the link handy as i'm not using that extension currently.
Like halal food, or kosher food in New York, it's not about how many people use a browser feature. It's about how much they care.
> that the majority of users don't use spacebar for scrolling in 2019
I don't use the spacebar for scrolling, too. But I'm pretty sure there are people who do; and those people care.
> I'm not sure it's bad enough to need a bookmarklet to kill it.
Well, it's bad enough for me that medium.com has a too-giant banner that covers over 30% of the viewport...
At the very least, it was bad enough that I submitted this page, even when I usually don't think that web-trends (like npm, 4MB of JS, 'modern' look of applications, etc...) are bad (opposed to the HN crowd).
If you are designing the web for people of all abilities, then consideration of space bar scrolling is important.
Imagine the frustration of a user that expects certain behavior of the space bar and experiences something else.
I guess you can make the same argument that it's possible that people don't use PgDown/PgUp either, but that's besides the point, I think.
Generally, interfaces have a lot of features by default and when a particular interface breaks or removes them for no good reason (and I don't think I've ever seen a sticky header that could justify it), well that at least leaves a very bad impression. It's wasteful.
Same goes for links and buttons which are made to work only when clicking with the mouse, when by default they work with the keyboard too. Same goes for text which is set with a fixed width and necessitates a large minimum window width to read properly when by default text adjusts to a window's width. etc.
Nobody is average, so the world would suck if it only worked for the average.
For the record, I do scroll with the spacebar. I like to skim pages as quickly as possible, and PgDown is in different positions in different keyboards, so I just find spacebar to be super-accessible.
javascript:(function()%7B(function () %7Bvar i%2C elements %3D document.querySelectorAll('body *')%3Bfor (i %3D 0%3B i < elements.length%3B i%2B%2B) %7Bif (getComputedStyle(elements%5Bi%5D).position %3D%3D%3D 'fixed' || elements%5Bi%5D.className %3D%3D%3D 'awsui-flashbar') %7Belements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D)%3B%7D%7D%7D)()%7D)() javascript:(function(){
document
.querySelectorAll(
'[style*="font"]'
).forEach(elem =>
elem.removeAttribute(
'style'))
})()Block element