• Resolved Cajuna

    (@cajuna)


    How can i put opacity in the top-bar?
    I tried this:
    Original:

    #nav-topbar.nav-container { background: #FF0000;
    -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.2),0 1px 0 rgba(255,255,255,0.15);
    box-shadow: 0 0 5px rgba(0,0,0,0.2),0 1px 0 rgba(255,255,255,0.15); }

    Edit:

    #nav-topbar.nav-container { background: #FF0000; opacity: 0.4;
    -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.2),0 1px 0 rgba(255,255,255,0.15);
    box-shadow: 0 0 5px rgba(0,0,0,0.2),0 1px 0 rgba(255,255,255,0.15); }

    I tried but my words did the opacity too
    (srry for my bad english)

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Cajuna. Welcome to the Hueman forum. Unfortunately, using the opacity property affects the main element and all the elements within it. See <a href=”https://robertnyman.com/2010/01/11/css-background-transparency-without-affecting-child-elements-through-rgba-and-filters/
    “>this article for more information. You can work around that by using the background property with the rgba argument to set the color and the opacity. Try this and see how it works:

    #nav-topbar.nav-container {
        /* Fallback for web browsers that don't support RGBa */
        background: rgb(255, 0, 0);
        /* RGBa with 0.4 opacity */
        background: rgba(255, 0, 0, 0.4);
        -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.2),0 1px rgba(255,255,255,0.15);
        box-shadow: 0 0 5px rgba(0,0,0,0.2),0 1px 0 rgba(255,255,255,0.15);
    }
    Thread Starter Cajuna

    (@cajuna)

    Can i edit the menu if im on home or something the background is like if your muse is above these button?
    Thanks

    Give this a try:

    #nav-topbar .nav li.current-menu-item  {
        background: #781d20;
    }
    Thread Starter Cajuna

    (@cajuna)

    Yes, it works!

    Hello, I am new to codes and all.
    Please let me know where I should put these codes.
    I have tried inserting it in the custom css manager this way:

    /* header : nav topbar
    /* ———————————— */
    #nav-topbar.nav-container { background: #FF0000; opacity: 0.4;
    -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.2),0 1px 0 rgba(255,255,255,0.15);
    box-shadow: 0 0 5px rgba(0,0,0,0.2),0 1px 0 rgba(255,255,255,0.15); }
    But it makes no changes.
    Please let me know in which section I should put the code.
    If I insert it directly at the theme editor, do I have to delete the original code and replace it?
    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Opacity menu’ is closed to new replies.