title: Get previous li of active class
body: <p>I have the following html</p>
  
  <pre><code>&lt;ul&gt;
     &lt;li&gt;Home&lt;/li&gt;
     &lt;li class="active"&gt;About&lt;/li&gt;
     &lt;li&gt;Contact&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I want to override some css property of a li only if the next li class is active.</p>
  
  <p>My css is </p>
  
  <pre><code>ul li{
  color:#eee
  }
  
  ul li.active{
  color:#000;
  }
  </code></pre>
  
  <p>So I want to add a border to that li whose next li class is active.So in this case I want to add a border to home.It can't be same all the time as if the active class is set for contact then I would like to add a border for about us.</p>
  
  <p>I am not sure if this can be done using css or javascript.</p>
  
  <p>Any suggestion/hint is highly welcomed. Thanks in advance. </p>