title: CSS position absolute and width of parent container in percent
body: <p>I'm trying to build a HTML/CSS dropdown menu which is flexible in width. Due to the <code>position:absolute</code> for the second level of the navigation, I don't get the width of the first level. Removing the position:absolute will move all following elements on hover...</p>
  
  <p>How can I solve this?</p>
  
  <p>Here is the code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  
  .level_1 &gt; li {
    float: left;
    width: 45%;
    background-color: #2FA4CF;
    margin-right: 6px;
  }
  
  .level_1 &gt; li:hover ul {
    display: block;
  }
  
  .level_2 {
    display: none;
    position: absolute;
    width: 45%;
  }
  
  .level_2 li {
    background-color: #535B68;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ul class="level_1"&gt;
    &lt;li&gt;
      &lt;a href="#"&gt;Level one (1)&lt;/a&gt;
      &lt;ul class="level_2"&gt;
        &lt;li&gt;&lt;a href="#"&gt;Level two (1)&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;Level one (2)&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  
  &lt;p&gt;Paragraph&lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>See the result here: <a href="http://jsfiddle.net/5uf2Y/" rel="noreferrer">http://jsfiddle.net/5uf2Y/</a>
  Hover "Level one (1)" and you will see, that the second level is not the same size like the first level...</p>