Mega Menu Item Class - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Mega Menu Item Class

AF

Andrew Freeman

Helix Framework 2 years ago

Hey,

I've used mega menu to give an item its own class so I can customise it to make it stand out (See last Book a Demo menu link). Problem is, using that new class (I called it .demo) I can't get the text color to change, it must be being overrided somewhere?

0
2 Answers
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 2 years ago #129053

Hi there!

Thanks for contacting us.

Kindly, be more specific and deep with your selector in this case.

Here is sample code snippet for you:

li.sp-menu-item.demo a{
    color: #FFFFFF;
}

Note: Path towards custom CSS(Joomla 4): System>Site Templates Styles> Click on your current default template name then choose Template Options. Then find custom CSS within the custom code.

https://prnt.sc/5mBuSRh907N3

https://prnt.sc/ooiq-lkMEXr_

https://prnt.sc/nunlX-f5AhK1

Hope this helps!

Best Regards

0
Pavel
Pavel
Accepted Answer
2 years ago #129057

Hi. If I may, a small lecture. :)

When filling the class field in the mega menu settings, this adds the class to li tags.

Make sure you use the correct selector. Basically, it should be like that .demo a. But when using such a selector, you should use !important since the selector from the template .sp-megamenu-parent > li > a is stronger than your.

Using !important should be avoided if possible, for this you must strengthen your selector by making it like that li.demo a.

0