Stop Shrinking Header On Scroll

shrink_mobile_header.png

Description

When fixed, the header tends to shrink a little on scroll – this stops that! This plugin uses css editor and works with Squarespace 7.1.


How To Install

From your Squarespace account, go to the Custom CSS Editor. Copy and paste the code below into the Custom CSS Editor box.

// Stop Shrinking Header On Scroll - Desktop //

.header.shrink .header-announcement-bar-wrapper {
  padding-top: 25px !important;
  padding-bottom: 25px !important;
  }

// Stop Shrinking Header On Scroll - Mobile //

@media only screen and (max-width: 640px) { .header.shrink .header-announcement-bar-wrapper {
  padding-top: 25px !important;
  padding-bottom: 25px !important;
  }}

Customize

Adjust the padding values to match the same padding as your desktop and mobile header when it is not being scrolled.

This code will only work for headers that have the fixed: basic setting enabled in header settings.


Previous
Previous

Frosted and Blurry Header (7.0 Version)

Next
Next

Frosted and Blurred Button Block