Very new to Drupal and a bit confused.
In order to render a menu in my theme I've been using this:
print theme('links', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links'))));
That works a treat and gives me an extra class on the first and last list items, which I need for styling. It doesn't, however, show any of the nested sub menus. So I found this that again, worked like a charm Show all nested menu links in Drupal 7 and shows all the top-level links in the main menu and the nested ones too. This doesn't give me the extra classes on the first and last list items which I need. Is there any way to use the code from the answer above and give the extra classes on the list items?