title: CSS / JQuery Horizontal menu with 2 line
body: <p><a href="https://i.stack.imgur.com/1FDPB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1FDPB.jpg" alt="a busy cat"></a>
  </p>
  
  <p>I created a menu with jquery: div 1 for a main menu and div 2 for the submenu.
  When you hover the mouse over the item, the div 2 appears under the selected menu.</p>
  
  <p>Can I make a menu more optimized?</p>
  
  <p>Can you make a CSS menu on 2 lines with the function described in the image?</p>
  
  <pre><code>&lt;div id="main-menu"&gt;
      &lt;ul&gt;
          &lt;li&gt;&lt;a href="#" class="category" rel=""&gt;Home&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#" class="category" rel="submenu1"&gt;test&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  
  &lt;div id="menu-wrap"&gt;
      &lt;div id="menu"&gt;
          &lt;div id="submenu1" class="submenu"&gt;
              &lt;ul&gt;
                  &lt;li&gt;&lt;a href="#"&gt;sub menu 1&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;sub menu 2&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>is possible to realize the menu without the use of jquery but only CSS?</p>