Support » Plugin: Sticky Menu, Sticky Header (or anything!) on Scroll » Menu styling classes don’t work

  • Resolved Euler Arthur Vieira

    (@eulerarthur)


    The classes .element-is-sticky and .element-is-not-sticky does not work. I’m trying to add some styles to the menu when it is sticky, but nothing happens when I put the code in aditional CSS.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • It’s likely that your theme is overriding these styles, and that you will need some more specific CSS code.

    Can you tell me the code you tried to add so I can take a look?

    I tried this just for a test:

    .element-is-not-sticky {
    background: red;
    }

    .element-is-sticky {
    background: blue;
    }

    and did not work.

    It looks like your theme is using !important in its code, so you will need to override that using this code:

    .element-is-not-sticky .main-header-bar{
        background: red !important;
    }
    
    .element-is-sticky .main-header-bar{
        background-color: blue !important;
    }

    Thank you! But the header stays blue only, even in the top when it supposedly should be not sticky and so, red.

    That is because your header is always sticky. Since it’s already at the top of the page when you load the page, it’s sticky by default, and so it will always be blue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Menu styling classes don’t work’ is closed to new replies.