In my project, there is Megamenu implemented and to customization of Megamenu, I have used custom _module.less in my theme folder By overriding the Megamenu Folder.

app->code->RB->Megamenu (is the Megamenu that i have implemented).which contains its core files (Megamenu module folder)

app->design->mytheme->RB_Megamenu->web>source->css->_module.less (In this file i have put customizing Megamenu css)

Now the issue is whenever I disable Megamenu and the default Magento Menu is Enabled, The default Magento menu taking CSS of from Megamenu which creates confliction between two CSS file.

  • After disabeling did you deployed static content ? and flushed cache ? Commented May 21, 2018 at 12:09
  • yes i have deploy static content and also flushed cache as well Commented May 21, 2018 at 12:17
  • 1
    If you want that remove your style when module is disabled, then you have to add your style in your module which is placed at app->code->RB->Megamenu, because Magneto will compile all less files which placed in theme folder. Commented Jun 9, 2018 at 11:28
  • yes you are right Dipesh, Commented Aug 18, 2018 at 8:42

2 Answers 2


Can You please Try to put _module.less in your module folder , remove it from theme directory Place it at NameSpace >> ModuleName >> view >> frontend >> web >> css >> source >> _module.less

Clear content of var/cache var/page_cache pub/static and generated/

After that deploy using php bin/magento setup:static-content:deploy

  • I am not sure but there may be name space mistake Commented May 21, 2018 at 12:26

Kindly Run below command :

php bin/magento clear:cache
php bin/magento setup:static-content:deploy

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.