title: How to highlight a parent list item without highlighting children list items?
body: <p>I'm having trouble with a link list I'm generating using Wordpress, which displays a specific page link as well as all of its children pages links. I'm trying to have the links become highlighted when you hover over them, and then when you click on them and navigate to the page, that page's link stays highlighted. I have found a way to mostly achieve this using: </p>
  
  <pre><code>#sidebar a:hover{
      padding: 7px;
      background-color: #f7f9fe;
      color: #728186;
  }
  #sidebar ul &gt; li .current_page_item{
      padding: 7px;
      background-color: #f7f9fe;
      color: #728186;
  }
  </code></pre>
  
  <p>but that doesn't allow me to highlight the parent page/li. If I use: </p>
  
  <pre><code>#sidebar li.current_page_item
  </code></pre>
  
  <p>the child stays highlighted on its page, but on the parent page it also highlights the child item, not just itself.</p>
  
  <p>here's my parsed php: </p>
  
  <pre><code>&lt;ul id="sidebar" class="sidelist"&gt;
      &lt;li class="pagenav"&gt;&lt;h5&gt;WHAT WE DO&lt;/h5&gt;
          &lt;ul&gt;
              &lt;li class="page_item page-item-39 current_page_item"&gt;&lt;a href="http://www.autismrecoveryfoundation.org/meet-the-board" title="Meet the Board"&gt;Meet the Board&lt;/a&gt;
              &lt;ul class='children'&gt;
                  &lt;li class="page_item page-item-84"&gt;&lt;a href="http://www.autismrecoveryfoundation.org/meet-the-board/being-a-board-member-101" title="Being A Board Member 101"&gt;Being A Board Member 101&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/li&gt;   
  &lt;/ul&gt;
  </code></pre>
  
  <p>Here is the template tag I'm using from the Wordpress page about wp list pages (http://codex.wordpress.org/Function_Reference/wp_list_pages):</p>
  
  <pre><code>&lt;?php 
              // use wp_list_pages to display parent and all child pages all generations (a tree with parent)
              $parent = 39;
              $args=array(
               'title_li' =&gt; '',
               'child_of' =&gt; $parent
              );
              $pages = get_pages($args);  
              if ($pages) {
                $pageids = array();
                foreach ($pages as $page) {
                  $pageids[]= $page-&gt;ID;
                }
  
                $args=array(
                  'title_li' =&gt; '&lt;h5&gt;WHAT WE DO&lt;/h5&gt;',
                  'include' =&gt;  $parent . ',' . implode(",", $pageids)
                );
                wp_list_pages($args);
              }
          ?&gt;
  </code></pre>