Stopping the Header from Shrinking via the Customizer
Recent versions of the Divi Theme give you a way to achieve this effect without the need for code. Using Divi's customizer settings, you can simply set the "primary menu bar" and "fixed navigation" to have the same height.
This can be done with the following customizer settings:
- Header & Navigation » Primary Menu Bar » Menu Height
- Header & Navigation » Fixed Navigation Settings » Fixed Menu Height
Stop the Header Shrinking on Scroll using JQuery
Here's a method I came up with before it was possible to stop the shrinkage via the customizer. It may still prove useful in some circumstances so I'll keep it up here. The solution is to add the following jQuery code to Divi:
You can add this code via a single click in Divi Booster from 2.0.3 onwards.