3 ms·
I'm sorry, but fixed headers are almost always a bad idea, because it make assumptions about the clients that may not be valid. The assumption is that the clien
by mrweasel 10y ago
I'm sorry, but fixed headers are almost always a bad idea, because it make assumptions about the clients that may not be valid. The assumption is that the client has the vertical space for a fixed header.
Even the example is shown for a client that has plenty of vertical space. If the user is on something like a 13" laptop, the fixed header reduces the amount of "usable" space on the page.
Unless you're absolutely sure that the client is on a big monitor, and has a browser window that's higher than it is wide, don't use fixed headers.
Interestingly enough you rarely see website/webapps that utilises the fact that most users are on wide-screen monitors (mobile excluded).
- RubyPinch 10y agoIts optional though. If you don't want it, don't add it
- SparkyMcUnicorn 10y agoI guess there's the ability of adding a media query for a certain height so it only shows up on taller screens.
- luke3butler 10y agoMedia Query + min-width fix. https://gist.github.com/luke3butler/72492aaa68ee9425758ee7869bdf441f https://gist.github.com/luke3butler/72492aaa68ee9425758ee786...
- AlphaSite 10y agoOne other major failing is zooming nearly always breaks fixed headers.
- AlphaSite 10y agoOne other major failing is zooming nearly always breaks fixed headers.
- kevinmgranger 10y agoAnd if the user is on a laptop, they likely have a Home key, making accessing the header one button press away. It makes more sense on mobile devices where scrolling up can be a pain.
- marvindanig 10y agoAnd scrolling down too! In fact scrolling seems to be an anti-pattern for mobile web where touch and swipe are primary interactions. Just sayin'.
- Rafert 10y agoThey're not all bad. I like sites where the sticky bar hides after scrolling down for a bit and reappears when scrolling up.