The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Twitter profile mobile navbar style (Late 2015) Reply To: [Solved] Twitter profile mobile navbar style (Late 2015)


Desktop shouldn’t be a problem. Unless you use a smooth scroll plugin, the effect will be mostly lost though.

Shouldn’t your header start at a larger size then? If so, how much… I could put something together based on the first pen. That makes most sense to me.

This is the only essential bit by the way :

if (st <= 40) {
newH = menu;
newP = 0;
else if (st <= 70) {
newH = menu - st + 40;
newP = st - 40;
else {
newH = 60;
newP = 30;

Below 40 pixels scrolled and above 70, basically do nothing, keep fixed heights. In between, make the header a pixel smaller with each pixel scrolled. And add just as much padding to the top of the following content so it appears to stand still.