html { scroll-padding: calc(280px + 68px); } @media ( max-width: 900px ) { html { scroll-padding: calc(162px + 68px); } }