title: Confused on aligning the content with Image
body: <p>I'm writing a HTML code where there are a <code>span</code>s with some text and and Image beside them.</p>
  
  <p>I'm trying to do the below.</p>
  
  <ol>
  <li>Vertically center the content.</li>
  <li>Make the div width as the width of content. i.e. the word should be in single line rather than break.</li>
  <li>Make the content start from left (later I'll get rid of the borders and it will appear to be in a grid of 4 columns).</li>
  </ol>
  
  <p>Working fiddle. <a href="https://jsfiddle.net/vqvjtsLz/2/" rel="nofollow noreferrer">https://jsfiddle.net/vqvjtsLz/2/</a></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>.resultTable {
    margin-top: 0.85em;
    border-radius: 5px;
    background-color: #ffffff;
    box-shadow: 0 1px 7.5px 0 rgba(217, 217, 217, 0.3);
  }
  
  .combiNum {
    height: 25%;
    text-transform: uppercase;
    color: #1779d0;
  }
  
  .combiDiv {
    display: flex;
    height: 25%;
    text-align: left;
    align-items: left;
    margin-left: 2%;
  }
  
  span.mainspan0,
  span.mainspan1,
  span.mainspan2,
  span.mainspan3 {
    border: 1px solid;
    width: 22%;
    padding: 0.85em;
    display: inline-block;
    vertical-align: middle;
  }
  
  .logoImageSpan {
    float: left;
    margin-top: 3%;
    background-repeat: no-repeat;
    background-size: auto 100%;
    background-position: center;
    height: 50px;
    width: 50px;
    margin-left: -2%;
    -moz-border-radius: 30px;
    border-radius: 30px;
    color: white;
  }
  
  span.elementClass {
    text-align: left;
    display: block;
    text-transform: capitalize;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="resultTable" id="resultTable"&gt;
    &lt;div class="combiNum"&gt;Combination #1&lt;/div&gt;
    &lt;div class="combiDiv"&gt;
      &lt;span class="mainspan0"&gt;
                      &lt;span class="logoImageSpan"&gt;
                          &lt;img src="https://image.ibb.co/jphBQR/sulphide.png" alt="sulphide" border="0" /&gt;
                      &lt;/span&gt;
      &lt;span id="element1" class="elementClass"&gt;Sulphates&lt;/span&gt;
      &lt;span id="element2" class="elementClass"&gt;0.575&lt;/span&gt;
      &lt;/span&gt;
      &lt;span class="mainspan1"&gt;
                      &lt;span class="logoImageSpan"&gt;
                          &lt;img src="https://image.ibb.co/jRjQkR/alcohol.png" alt="alcohol" border="0" /&gt;
                      &lt;/span&gt;
      &lt;span id="element1" class="elementClass"&gt;Alcohol&lt;/span&gt;
      &lt;span id="element2" class="elementClass"&gt;10.25&lt;/span&gt;
      &lt;/span&gt;
      &lt;span class="mainspan2"&gt;
                      &lt;span class="logoImageSpan"&gt;
                          &lt;img src="https://image.ibb.co/cPWGs6/sulphurdioxide.png" alt="sulphurdioxide" border="0" /&gt;
                      &lt;/span&gt;
      &lt;span id="element1" class="elementClass"&gt;Total sulfur dioxide&lt;/span&gt;
      &lt;span id="element2" class="elementClass"&gt;98.5&lt;/span&gt;
      &lt;/span&gt;
      &lt;span class="mainspan3"&gt;
                      &lt;img src="https://image.ibb.co/bT70Km/next.png" alt="next" border="0" /&gt;
                  &lt;/span&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>