add padding outside list element in a css menu on hover
<p>I have a css menu with 3 levels. The levels appear as you hover over the previous level element.</p>

<p>I want to add a padding to the right side of the second level (the dark brown part) so that the 3rd level stays open when moving the cursor to the right. This is to prevent the menu from disappearing when you move the mouse in between the two list items.</p>

<p>I tried adding a padding-right on the hover, but it is added on the inside of the element instead of the outside.</p>

<p>The blue part should remain the same size, and the padding should be added to the right of it, without visually changing anything.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>.list-item-2 {
  /* hover over level 2 */
  &amp;.hover, &amp;: hover {
    padding-right: 100px;
    box-sizing: content-box;
    /* level 3 */
    &gt; ul {
      background: $colorBrownLight;
      max-height: 500px;
      top: 0;
      left: 230px;
      @include opacity(1);
    }
  }
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;nav class="main-navigation clearfix"&gt;
  &lt;ul class="menu"&gt;
    &lt;li class="even first menu-mlid-1601 list-item-1 list-parent list-parent-1 expanded targetInvisible"&gt;
      &lt;div class="toggler nolink-wrapper"&gt;&lt;span title="" class="nolink"&gt;Ons aanbod&lt;/span&gt;
      &lt;/div&gt;
      &lt;ul class="menu targetDepth1"&gt;
        &lt;li class="even first menu-mlid-2116 list-item-2 list-parent list-parent-2 expanded targetInvisible"&gt;
          &lt;a href="/nl/ons-aanbod/diversiteit" title=""&gt;Diversiteit&lt;/a&gt;&lt;span class="toggler icon"&gt;&lt;/span&gt;
          &lt;ul class="menu targetDepth2"&gt;
            &lt;li class="even first menu-mlid-2118 list-item-3 list-child leaf"&gt;&lt;a href="/nl/ons-aanbod/diversiteit?audience%2525255B%2525255D=42" title=""&gt;Voor groepen&lt;/a&gt;
            &lt;/li&gt;
            &lt;li class="odd last menu-mlid-2119 list-item-3 list-child leaf"&gt;&lt;a href="/nl/ons-aanbod/diversiteit?audience%255B%255D=44" title=""&gt;Voor scholen&lt;/a&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li class="odd menu-mlid-2117 list-item-2 list-parent list-parent-2 expanded targetInvisible"&gt;
          &lt;a href="/nl/ons-aanbod/architectuur" title=""&gt;Architectuur&lt;/a&gt;&lt;span class="toggler icon"&gt;&lt;/span&gt;
          &lt;ul class="menu targetDepth2"&gt;
            &lt;li class="even first menu-mlid-2120 list-item-3 list-child leaf"&gt;&lt;a href="/nl/ons-aanbod/architectuur?audience%25255B%25255D=42" title=""&gt;Voor groepen&lt;/a&gt;
            &lt;/li&gt;
            &lt;li class="odd last menu-mlid-2121 list-item-3 list-child leaf"&gt;&lt;a href="/nl/ons-aanbod/architectuur?audience%255B%255D=44" title=""&gt;Voor scholen&lt;/a&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li class="even last menu-mlid-1849 list-item-2 list-child leaf"&gt;&lt;a href="/nl/beleef-de-stad/architectuur-stedenbouw-op-maat" title=""&gt;Architectuur op maat&lt;/a&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li class="odd menu-mlid-1857 list-item-1 list-child leaf"&gt;&lt;a href="/nl/beleef-de-stad/hoe-reserveren" title=""&gt;Reserveren&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class="even menu-mlid-1604 list-item-1 list-parent list-parent-1 expanded targetInvisible"&gt;
      &lt;div class="toggler nolink-wrapper"&gt;&lt;span title="" class="nolink"&gt;Over ons&lt;/span&gt;
      &lt;/div&gt;
      &lt;ul class="menu targetDepth1"&gt;
        &lt;li class="even first menu-mlid-1684 list-item-2 list-child leaf"&gt;&lt;a href="/nl/missie-en-visie"&gt;Missie en visie&lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="odd menu-mlid-1686 list-item-2 list-child leaf"&gt;&lt;a href="/nl/werking"&gt;Werking&lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="even menu-mlid-1687 list-item-2 list-child leaf"&gt;&lt;a href="/nl/geschiedenis"&gt;Geschiedenis&lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="odd menu-mlid-1688 list-item-2 list-child leaf"&gt;&lt;a href="/nl/administratie" title=""&gt;Administratie&lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="even last menu-mlid-1685 list-item-2 list-child leaf"&gt;&lt;a href="/nl/word-vriend"&gt;Word vriend&lt;/a&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li class="odd last menu-mlid-1673 list-item-1 list-child leaf"&gt;&lt;a href="/nl/contactformulier" title=""&gt;Contact&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;</code></pre>
</div>
</div>
</p>

<p>with padding:
<a href="https://i.stack.imgur.com/yWSbl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yWSbl.png" alt="with padding"></a></p>

<p>without padding: (how it should look)
<a href="https://i.stack.imgur.com/USsv0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/USsv0.png" alt="without padding"></a></p>