How to keep a MENU FIXED on the screen (Sticky Menu)
To keep the menu of your page fixed on the screen while visitors browse your site, follow the tutorial below:
- Log in to your GreatPages account and access the page editor;

- Go to the gear icon in the top right corner of the screen;

- Go to "Javascript & CSS" and click on "Adicionar código";

- Give it a name, check the "Funcionamento" option and add the entire code below into the text field;
<script>
(function () {
var primeiroBloco = document.querySelector('#site .gpc-b:first-of-type');
if (!primeiroBloco) return;
var segundoBloco = primeiroBloco.nextElementSibling;
function fixarMenu() {
if ((window.pageYOffset || window.scrollY) > 0) {
primeiroBloco.style.position = 'fixed';
primeiroBloco.style.top = '0';
primeiroBloco.style.left = '0';
primeiroBloco.style.width = '100%';
primeiroBloco.style.zIndex = '9999999';
if (segundoBloco) {
segundoBloco.style.marginTop = primeiroBloco.offsetHeight + 'px';
}
} else {
primeiroBloco.style.position = '';
primeiroBloco.style.zIndex = '';
if (segundoBloco) {
segundoBloco.style.marginTop = '0px';
}
}
}
window.addEventListener('scroll', fixarMenu, false);
fixarMenu();
})();
</script>

- After that, click on "Salvar".
How to keep a SPECIFIC BLOCK FIXED on the screen — https://ajuda.greatsoftwares.com.br/pt-br/article/como-manter-um-bloco-especifico-fixo-na-tela-36zpp/
Updated on: 08/01/2026
Thank you!
