Issues whith fixed header in published page (not in preview mode)

Hey everyone,

I have tryed to install a fixed header following several solutions (scripts) proposed in old forums. All of them looks fine in a preview mode but when I look in the published page the colors of the background of the different sections are moved upwards (with one script even some section are moved downwards), any idea of what could be happening ?