Styling auto navigation, different style for sub pages

I have a vertical navigation and i'm trying to make the sub page links appear different to the parent link, example below

Parent 1
Parent 2
-Parent 2 sub
-Parent 2 sub
Parent 3

When on the Parent 2 page, the sub pages appear below but are styled in the same format so dont stand out, is there anyway to apply a different style to them. Looked at the source code and the li styles are all the same.


View Replies:
dsw528 replied on at Permalink Reply
What theme are you using? Also, could you attach a file with the snippet of source code you are referring to?
oakleafg replied on at Permalink Reply
Its a custom theme and just using the auto navs header_menu template. Can't see any classes or ids in there that can be used to style the sub menu links.
   defined('C5_EXECUTE') or die("Access Denied.");
   $aBlocks = $controller->generateNav();
   $c = Page::getCurrentPage();
   echo("<ul class=\"nav-header\">");
   $nh = Loader::helper('navigation');
   $isFirst = true;
   foreach($aBlocks as $ni) {
      $_c = $ni->getCollectionObject();
      if (!$_c->getCollectionAttributeValue('exclude_nav')) {
         $target = $ni->getTarget();
         if ($target != '') {
            $target = 'target="' . $target . '"';
         if ($ni->isActive($c) || strpos($c->getCollectionPath(), $_c->getCollectionPath()) === 0) {
lenesi replied on at Permalink Reply
You can style nested list items differently to their parent without classes or ids e.g.
ul li {style} for top level pages.
ul ul li {style} for second level (or below) pages.