Mobile menu behaving strangely

Hi there, see this site:

When you view on a mobile, when it first loads the colors are off (see left of below image) when you scroll down a little, it corrects itself (see right of image)

This is after I have put in code from a previous post: https://theme.co/apex/forum/t/menu-hover-link-not-working/27340

Thanks for you help.

Hello @logoglo,

Thanks for asking. :slight_smile:

Please try adding following CSS under X > Theme Options > CSS:

.x-navbar {
    background-color: #121212 !important;
}

Thanks.

Hey, that works kinda, but it looses the effect I have one there, ie, transparent , scrolls into less transparent…this makes it solid.

Hi There,

Please delete the previous CSS and try with this CSS instead:

@media (max-width: 979px){
    .x-navbar {
        background-color: rgba(51, 51, 51, 0.75) !important;
    }
}

Hope it helps :slight_smile:

Nearly there! thank you, but its pushing the image down, instead over going over the top, so you get a white area above, and it looks wrong…

Hi There,

Please try with this CSS instead:

@media (max-width: 979px){
    .x-navbar {
        background-color: rgba(51, 51, 51, 0.75) !important;
        position: absolute;
        width: 100%;
    }
    .x-navbar.x-navbar-fixed-top {
        position: fixed;
    }
}

Perfect! thank you!

You’re welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.