Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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).



Its optional though.

If you don't want it, don't add it


And 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.


And scrolling down too! In fact scrolling seems to be an anti-pattern for mobile web where touch and swipe are primary interactions. Just sayin'.


One other major failing is zooming nearly always breaks fixed headers.


I guess there's the ability of adding a media query for a certain height so it only shows up on taller screens.



They're not all bad. I like sites where the sticky bar hides after scrolling down for a bit and reappears when scrolling up.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: