I've seen lots of answers, but they only allow you to add classes to all Menu Blocks, or to specific Menus.

I have multiple menu blocks with the same menu behind them (1st level block, 2nd level block, etc.)

I need each menu block to have a unique class based upon the name of the Menu Block. Is this possible?

1 Answer 1


Unless your theme changes the usual behavior then each of your menu blocks will have its own unique ID so you can use CSS like this (note the ID/class I used here might not be the ones you have to use, they're just an example):

#block-menu-block-2 ul.menu

This way you don't have to worry about overriding the markup of the menu to add classes in.

  • I was hoping to have a way to use the UL, since I stripped the wrapper div already (I hate Drupal's DOM bloat).
    – Joren
    May 20, 2015 at 17:47
  • There is a way to do that, I just put this as an alternative.
    – rooby
    May 20, 2015 at 23:10

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.