Hi. I've managed to assign grid classes to everything besides my main menu items. I don't seem to be able to do this in template.php.

Comments

laura s’s picture

If you want to assign classes to each menu item, you might look at http://drupal.org/project/menu_attributes. Simply by assigning the class you want, the sqauregrid css will do its thing.

drushinka’s picture

Thanks! I got my classes assigned to the menus, but they're still not doing what I want, which is to expand to 100% width in mobile view. What's the best way to do that in the theme?

laura s’s picture

Version: 7.x-3.x-dev » 7.x-2.x-dev

I'm assuming you're working with the 2.x branch. This is getting much more simplified in the 3.x branch (which, as I write this, is working but subject to revision and therefore is not ready for production).

To focus on mobile, you can (a) set your styles globally and then override it in the responsive css for larger @media-targeted styles, or (b) you can add the style in mobile-only @media styles. Something like:

@media screen only and (max-width: 640px) {

  ul#main-menu li a {
    display: block;
    padding: .5em 1em;
    width: auto;
  }

}

Is this what you're after?

drushinka’s picture

Yes, thank you. And great theme!

laura s’s picture

Status: Active » Fixed

Thanks! I welcome your feedback.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.