> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://ajuda.greatsoftwares.com.br/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 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:

1. Log in to your GreatPages account and access the page editor;

![](https://storage.crisp.chat/users/helpdesk/website/-/a/6/a/b/a6ab90d8350d6000/click-desing_1pg15ca.png =708xauto)

2. Go to the **gear icon** in the top right corner of the screen;

![](https://storage.crisp.chat/users/helpdesk/website/-/a/6/a/b/a6ab90d8350d6000/click-ingre_g3koxk.png =691xauto)

3. Go to **"Javascript & CSS"** and click on "Adicionar código";


![](https://storage.crisp.chat/users/helpdesk/website/-/a/6/a/b/a6ab90d8350d6000/image_vfuiu9.png =834xauto)

4. Give it a **name**, check the **"Functionality"** 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>
```

![](https://storage.crisp.chat/users/helpdesk/website/-/a/6/a/b/a6ab90d8350d6000/javafunction_1om3fr5.png =504xauto)

4. After that, click on **"Salvar".**

|| Keep in mind that this code will only keep the first block fixed on the screen. If you need another block to stay fixed, follow the tutorial below, or contact our team on Chat. :-)  

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/