Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Parent Menu and Sub Menu Background Color

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #42695
    tingo
    Participant

    Hi :)
    Do you know how to do this please?

    I want the Parent of the active menu black.
    I’ve used CSS

    #sticky_navigation ul li.active a { background:#333; }

    [Your text to link here…](http://virtuemarttemplate.com/demo/VM01/index.php/layout “Example Page”)

    but this also changes the color of the

    .dropdown-menu

    Which I want keep “background:#FFF” white.

    Do you know how I can do this please?

    Many Thanks and Best Regards
    Charles

    #124383
    Kitty Giraudel
    Participant

    .nav > li a { background: #333; }

    #124384
    Paulie_D
    Member

    I THINK you could do it with

    .dropdown-menu li a {
    background:white;
    }

    #124386
    Kitty Giraudel
    Participant

    Yup, it is another solution as well.

    Either you apply the background to the main list only and not to the dropdown menues. Or you apply it to every list items and fix it on dropdowns.

    #124403
    Kitty Giraudel
    Participant

    This selector is getting heavy. You may reduce it: #sticky_navigation .active > a.

    #124427
    tingo
    Participant

    Thank you very much for your help Hugo

    #124592
    tingo
    Participant

    Hi Hugo
    Would you please help?

    I’ve changed the link color

    ul.dropdown-menu li.active a { #DAA520 !important; background#fff; }

    But the background on the active link is still black.

    [http://virtuemarttemplate.com/demo/VM01/index.php/layout/2-column-left]”Page Link”)

    Many Thanks for your help and time

    Best Regards
    Charles

    #124596
    Sedana
    Participant

    It’s not just a typo?
    background#fff; should be background:#fff;

    Also since you have been using !imporant it might be overridden by the
    ‘#sticky_navigation .active > a background: #333 !important;’ property.

    #124733
    tingo
    Participant

    The problem is when I remove the !important
    Then I lose the background color on both the parent
    and the submenu

    Many Thanks for your help

    #124737
    tingo
    Participant

    It’s ok I’ve fixed it Thanks!

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘CSS’ is closed to new topics and replies.