Site logo

Archived topic

Scrollbar to stop under sticky menu

1 reply · Started by Peter on March 24, 2018

Viewing posts 1–2 of 2

Hi,

How can recreate what Google does in its My Business webpage ...
mobile view
My Business Mobile View
desktop view
My Business Desktop View

... where the scrollbar starts under the sticky menu?

This is what I have so far:

::-webkit-scrollbar {
    height: 16px;
    overflow: hidden;
    width: 16px;
}

::-webkit-scrollbar-button {
    height: 0;
    width: 0;
}
::-webkit-scrollbar-corner {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,.1);
    background-clip: padding-box;
    border: solid transparent;
    border-width: 1px 1px 1px 0px;
    min-height: 28px;
    padding: 100px 0 0;
    -webkit-box-shadow: inset 1px 1px 0 rgba(0,0,0,.1), inset 0 -1px 0 rgba(0,0,0,.07);
    box-shadow: inset 1px 1px 0 rgba(0,0,0,.1), inset 0 -1px 0 rgba(0,0,0,.07);
}
::-webkit-scrollbar-track {
    background-clip: padding-box;
    border: solid transparent;
    border-width: 0 0 0 4px;
}

Thanks!

I believe they achieve that using an iframe. I'm not sure if it's possible to move the scrollbar down within a regular page. Might be worth asking over on stackoverflow.

This archived topic is closed to new replies.