• Resolved compil3r

    (@compil3r)


    Hello! I am trying to change just one item from the main megamenu (first level links), so it can be font color red and hover blue or something different (because the hover I have is already red).

    I’ve been trying many combinations using the item’s ID, but still doesn’t work.

    Reading the FAQs and installation guides, and some custom styling questions from here, I am using this:

    #{$wrap} #{$menu} {
        /** Custom styles should be added below this line **/
    
        /** First level links (headers) **/
        > li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-item-150525 > a {
            color:#BE1E1E !important;
        }
    
    }

    I added the !important so I can try to force it, but no luck. the menu item is 150525, I have this on my final html source:

    <li class='mega-menu-item mega-menu-item-type-taxonomy mega-menu-item-object-category mega-align-bottom-left mega-menu-flyout mega-menu-item-150525' id='mega-menu-item-150525'>
    	<a href="#">RED ITEM</a>
    </li>

    I’ve tried many things here, but style won’t change just for that menu item alone.

    Thanks in advance for any help on this!

    https://wordpress.org/plugins/megamenu/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi compil3r,

    Have you added the CSS to the correct menu theme, and is the link you want to highlight within a mega menu?

    Regards,
    Tom

    Thread Starter compil3r

    (@compil3r)

    Yes, I am selecting on Admin > Max Mega Menu > Menu Themes > Default, and then the highlighted item I want to change is in fact one of the top level links of the menu. If I change options on that default theme, the menu reacts (like changing font weight to bold) but nothing I put on custom CSS works.

    Plugin Author megamenu

    (@megamenu)

    Hi compil4r,

    The CSS above will only apply to links within a mega menu. Try removing:

    ‘> li.mega-menu-megamenu > ul.mega-sub-menu >’

    Custom styling of individual menu items is a feature in MMM Pro. It will auto generate optimised CSS (without the use of !important) if you’re struggling.

    Regards,
    Tom

    Thread Starter compil3r

    (@compil3r)

    Oh I need pro version then. Ok, thanks!

    Buddy you made one mistake.
    “color”
    Needs to be background-color
    and please remove ‘> li.mega-menu-megamenu > ul.mega-sub-menu >’

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom styling a single menu item by ID’ is closed to new replies.