title: Dynamic indenting of dropdown menu
body: <p>I've created a nested list, dropdown menu.</p>
  
  <p>Problem: The CSS is only handling 1 level of nested menus. I can't figure out how to set the position of nested items so it can handle multiple levels without me having to set those rules in a CSS file. </p>
  
  <p>This is a <a href="https://jsfiddle.net/uoydnc8h/4/" rel="nofollow">fiddle</a> I've been working with</p>
  
  <p>The CSS: </p>
  
  <pre><code>ul {
    text-align: left;
    display: inline;
    margin: 0;
    padding: 15px 4px 17px 0;
    list-style: none;
    -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
    -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
  }
  ul li {
    font: bold 12px/18px sans-serif;
    display: inline-block;
    margin-right: -4px;
    position: relative;
    padding: 15px 20px;
    background: #fff;
    cursor: pointer;
    -webkit-transition: all 0.2s;
    -moz-transition: all 0.2s;
    -ms-transition: all 0.2s;
    -o-transition: all 0.2s;
    transition: all 0.2s;
  }
  ul li:hover {
    background: #555;
    color: #fff;
  }
  ul li ul {
    padding: 0;
    position: absolute;
    top: 48px;
    left: 0;
    width: 150px;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    display: none;
    opacity: 0;
    visibility: hidden;
    -webkit-transiton: opacity 0.2s;
    -moz-transition: opacity 0.2s;
    -ms-transition: opacity 0.2s;
    -o-transition: opacity 0.2s;
    -transition: opacity 0.2s;
  }
  ul li ul li { 
    background: #555; 
    display: block; 
    color: #fff;
    text-shadow: 0 -1px 0 #000;
  }
  ul li ul li:hover { background: #666; }
  ul li:hover ul {
    display: block;
    opacity: 1;
    visibility: visible;
  }
  </code></pre>