• Hi,

    I have been trying to make a sticky menu. I could manage to set the z-index so that it always appears above the elements. However, when scrolling down, the menu bar background switches from black to white. How can I solve it ?

    Site uses generatepress theme and menu bar has the following additional CSS;

    .orjinmenu {
    background: #222; /* Show a solid color for older browsers */
    background: -moz-linear-gradient(#252525, #0a0a0a);
    background: -o-linear-gradient(#252525, #0a0a0a);
    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#252525), to(#0a0a0a)); /* older webkit syntax */
    background: -webkit-linear-gradient(#252525, #0a0a0a);
    -webkit-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
    -moz-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
    clear: both;
    display: block;
    float: left;
    margin: 0 auto 6px;
    width: 100%;
    }
    .orjinmenu ul {
    font-size: 15px;
    list-style: none;
    margin: 0 0 0 -0.8125em;
    padding-left: 0;
    }
    .orjinmenu li {
    float: left;
    position: relative;
    }
    .orjinmenu a {
    color: #eee;
    display: block;
    line-height: 3.333em;
    padding: 0 1.2125em;
    text-decoration: none;
    }
    .orjinmenu ul ul {
    -moz-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
    -webkit-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
    box-shadow: 0 3px 3px rgba(0,0,0,0.2);
    display: none;
    float: left;
    margin: 0;
    position: absolute;
    top: 3.333em;
    left: 0;
    width: 188px;
    z-index: 99999;
    }
    .orjinmenu ul ul ul {
    left: 100%;
    top: 0;
    }
    .orjinmenu ul ul a {
    background: #f9f9f9;
    border-bottom: 1px dotted #ddd;
    color: #444;
    font-size: 15px;
    font-weight: normal;
    height: auto;
    line-height: 1.4em;
    padding: 10px 10px;
    width: 268px;
    }
    .orjinmenu li:hover > a,
    .orjinmenu ul ul :hover > a,
    .orjinmenu a:focus {
    background: #efefef;
    }
    .orjinmenu li:hover > a,
    .orjinmenu a:focus {
    background: #f9f9f9; /* Show a solid color for older browsers */
    background: -moz-linear-gradient(#f9f9f9, #e5e5e5);
    background: -o-linear-gradient(#f9f9f9, #e5e5e5);
    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f9f9f9), to(#e5e5e5)); /* Older webkit syntax */
    background: -webkit-linear-gradient(#f9f9f9, #e5e5e5);
    color: #373737;
    }
    .orjinmenu ul li:hover > ul {
    display: block;
    }
    .orjinmenu .current-menu-item > a,
    .orjinmenu .current-menu-ancestor > a,
    .orjinmenu .current_page_item > a,
    .orjinmenu .current_page_ancestor > a {
    font-weight: bold;
    }

    My second question is how I can make the menu bar lower ?

    Thanks for the support in advance.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Sticky Menu with Elementor’ is closed to new replies.