title: Horizontal Multi level menu based on CSS only
body: <p>I am generating Multi Level menu dynamically and want this menu to show properly without using any JavaScript of jQuery, at this stage menu is only two level. </p>
  
  <p>Below is the menu structure generated dynamically</p>
  
  <pre><code>&lt;div id="cssmenu"&gt;
  &lt;ul &gt;
    &lt;li&gt;&lt;a href="/en/"&gt;Home&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="/en/"&gt;Menu 1&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="/en/menu2/"&gt;Menu 2&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="/en/menu3/"&gt;Menu 3&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="/en/menu4/"&gt;Menu 4&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="/en/menu5"&gt;Menu 5&lt;/a&gt;
      &lt;ul class="/en/menu5/menu5-1/"&gt;
        &lt;li&gt;&lt;a href=""&gt;Menu 5.1&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=""&gt;Menu 5.2&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=""&gt;Menu 5.3&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="/en/menu6/"&gt;Menu 6&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Multi level working with JS <a href="https://codepen.io/anon/pen/RMrqmQ" rel="nofollow noreferrer">https://codepen.io/anon/pen/RMrqmQ</a></p>
  
  <p>I need a pointer to good example, i have looked for example but all of them has class defined for UL &amp; li while my dynamic menu ul..li clean so that user can customize it based on there requirements</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Working on codepen, seems to work well <a href="https://codepen.io/anon/pen/bvEzwe" rel="nofollow noreferrer">https://codepen.io/anon/pen/bvEzwe</a></p>
  
  <pre><code>.nav ul {
    list-style: none;
    background-color: #444;
    text-align: center;
    padding: 0;
    margin: 0;
  }
  
  .nav li {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2em;
    line-height: 40px;
    text-align: left;
  }
  
  .nav a {
    text-decoration: none;
    color: #fff;
    display: block;
    padding-left: 15px;
    border-bottom: 1px solid #888;
    transition: .3s background-color;
  }
  
  .nav a:hover {
    background-color: #005f5f;
  }
  
  .nav a.active {
    background-color: #aaa;
    color: #444;
    cursor: default;
  }
  
  /* Sub Menus */
  .nav li li {
    font-size: .8em;
  }
  
  
  @media screen and (min-width: 650px) {
    .nav li {
      width: 130px;
      border-bottom: none;
      height: 50px;
      line-height: 50px;
      font-size: 1.4em;
      display: inline-block;
      margin-right: -4px;
    }
  
    .nav a {
      border-bottom: none;
    }
  
    .nav &gt; ul &gt; li {
      text-align: center;
    }
  
    .nav &gt; ul &gt; li &gt; a {
      padding-left: 0;
    }
  
    /* Sub Menus */
    .nav li ul {
      position: absolute;
      display: none;
      width: inherit;
    }
  
    .nav li:hover ul {
      display: block;
    }
  
    .nav li ul li {
      display: block;
    }
  }
  </code></pre>