Auto-size the height of a dropdown li element to accommodate multi-block content

For example, a sign-in login form is displayed when hovering over the top-level "Sign in" link.

  <li id="main-menu-user-login" class="has-dropdown">
                <a title="Sign into your account" href="">Sign in</a>
                <ul class="dropdown">
                  <li class="has-form">';
                     <!-- Enter username and password form labels and inputs, and the submit button -->
                  </li>
                </ul>
              </li>