title: Why is my CSS `ul li ~ li` not adjusting one of my HTML elements?
body: <p>I have added a snippet to show you where I got to below.</p>
  
  <p>I do not understand why I have the following problem...</p>
  
  <ul>
  <li>The <code>home</code> element is inside the <code>ul</code> like the rest of the navigation bar elements. But why is the bottom two styles inside the CSS  file is adjusting and applying styles to all other elements but not <code>home</code>?... </li>
  </ul>
  
  <p>Can someone explain where I am going wrong.. so confused..</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    margin-top: -15px;
    margin-left: 0;
    margin-right: 0;
    font-family: "Arial", serif;
  }
  
  img{
    height: 100px;
  }
  
  .nav {
    background-color: rgb(0,44,68);
    list-style: none;
    text-align: center;
    padding: 10px 0 2px 0;
  
  }
  
  .nav ul {
    display: flex;
    justify-content: space-around;
    padding: 0;
    align-items: center;
    font-size: 20px;
    font-family: Calendas-Plus;
  }
  
  .nav li{
    list-style: none;
    display: inline-block;
  }
  
  .nav a {
    color: white;
    text-decoration: none;
  }
  
  
  ul li {
    display: inline-block;
    padding: 0 10px;
  
  }
  ul li ~ li {
    border-right: 1px solid white;
    border-left: 1px solid white;
    border-top: 1px solid white;
    border-bottom: 1px solid white;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en" dir="ltr"&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;test&lt;/title&gt;
      &lt;link rel="stylesheet" href="styling.css" type="text/css"&gt;
  
  
    &lt;/head&gt;
    &lt;body&gt;
  
  
  
  &lt;div class="nav"&gt;
    &lt;ul&gt;
    &lt;li&gt;&lt;a href="/"&gt;Home&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="/"&gt;About&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="/"&gt;Products&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;img src="logo.png"&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;a href="/"&gt;Services&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="/"&gt;News&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="/"&gt;Contact&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  
  
  
  
    &lt;/body&gt;
  
  &lt;script src="app.js" charset="utf-8"&gt;&lt;/script&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>