4 ms·
A more sensible solution would be to convert all fixed elements into "position: absolute" ones. That is less prone to cause errors and avoids impeding navigatio
by ivanca 10y ago
A more sensible solution would be to convert all fixed elements into "position: absolute" ones. That is less prone to cause errors and avoids impeding navigation.
- tokensimian 10y agoYou are correct. However, the sites that do the overkill of a sticky header tend to also have poorly thought out site navigation and user experiences. Let's say on a normal site, killing any absolute nav would result in a 5%* decrease in UX. On a site like this, killing any absolute nav might result in a 5% increase in UX.
- 746F7475 10y agoBut that doesn't work as well, since for example on this page there is JS event tied to scrolling the page that moves the header with you. So you'd have to tie your own anti-move trigger to the same event, which might mean same script won't be universal. If you just remove the header with a script, you can still get to the navigation by refreshing the page.
- ivanca 10y agoI actually just tried in this page and it works perfectly even before any scrolling has happened by just using "position:absolute !important" in the "position:fixed" elements;
- wlesieutre 10y agoYou'd think so, but I've seen a lot of websites that dump a sticky "social sidebar" on top of the content, and if it's absolutely positioned you can't read the stuff that it's stuck in front of.