title: HTML text jumps out of DIV block
body: <p>I'm building a panel for a front end system, but I got an annoying problem.
  I am not that good with CSS. This is what happens:</p>
  
  <p><a href="https://i.stack.imgur.com/6Lt0i.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Lt0i.png" alt="enter image description here"></a></p>
  
  <p>This is my HTML code:</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>#main #myTopMenu #iconBar {
    margin-right: 10px;
    float: right;
  }
  
  #main #myTopMenu #iconBar a {
    display: inline-block;
    margin-left: 30px;
    color: white;
  }
  
  #main #myTopMenu #iconBar .optionsContainer {
    line-height: 55px;
  }
  
  #main #myTopMenu #iconBar .optionsContainer img {
    vertical-align: middle;
    position: relative;
  }
  
  #main #myTopMenu #iconBar .valueWithOption {
    background-color: #59a632;
    height: 25px;
    width: 35px;
    position: absolute;
    top: 10px;
    margin-left: 27px;
    border-radius: 4px;
  }
  
  #main #myTopMenu #iconBar .valueWithOption span {
    background-color: blue;
    width: 100%;
    height: 100%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="iconBar"&gt;
    &lt;a href="#"&gt;
      &lt;div class="optionsContainer"&gt;
        &lt;img src="images/icons/message.png"&gt;
        &lt;div class="valueWithOption"&gt;
          &lt;span&gt;5&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/a&gt;
    &lt;a href="#"&gt;
      &lt;div class="optionsContainer"&gt;&lt;img src="images/icons/bell.png"&gt;
        &lt;div class="valueWithOption"&gt;&lt;span&gt;5&lt;/span&gt;&lt;/div&gt;
      &lt;/div&gt;
    &lt;/a&gt;
    &lt;a href="#"&gt;
      &lt;div class="optionsContainer"&gt;&lt;img src="images/icons/settings.png"&gt;&lt;/div&gt;
    &lt;/a&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Also do you guys have tips to make it so that the width of the green box expands so that the value in the green box always fits properly.</p>