Hacker News new | past | comments | ask | show | jobs | submit login

Adding top padding would push the beginning of the content down nice and clear of the fixed header, but that's not enough to avoid the page down problem because for paging purposes it's normally the height of the box from border to border that is used - which seems right and consistent with (vertical) scrollbars normally being drawn from border to border. And top padding's only at the top of the first page of content anyway, not every page.

Anyway Firefox did make some effort to work around this common web design error (that being what I'd call it) which is probably why it behaves differently to Chrome: https://bugzilla.mozilla.org/show_bug.cgi?id=780345 but I still find it hit and miss between from one page to the next. As you mention there are many scenarios - what if the fixed header only goes across say half the width of the page? What if it's less than 100% opacity? What if it varies in height? The browser makers have to resort to "heuristics" and now we're off into the land of deep unpredictability.

While writing this I've also just noticed that - fixed header or no - pressing space / page down doesn't go exactly the same distance (in Firefox) as paging down by clicking on the scroll bar. Which is also a bit disconcerting.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: