title: Vertical centering in Android
body: <p>I used flexbox, table and <code>vertical-align</code> to try to resolve it, but it doesn't have any effect.</p>
  <p>You can see the screenshot below. Android's doesn't align middle (the <code>font-size</code> less than 12px) but iOS it work fine...</p>
  <h1>Remove line-height</h1>
  <p>set <code>line-height: normal</code>, upper's spacing is less then bottom...</p>
  <p><a href="https://i.stack.imgur.com/bC0xs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bC0xs.png" alt="remove line-height" /></a></p>
  <h1>Android</h1>
  <p><a href="https://i.stack.imgur.com/pTmqW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pTmqW.png" alt="android screenshot" /></a></p>
  <h1>iOS</h1>
  <p><a href="https://i.stack.imgur.com/U3mfz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U3mfz.png" alt="ios screenshot" /></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>.tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 -5px;
    padding-top: 10px;
  }
  .tag {
    flex: 0 0 25%;
    min-width: 0;
  }
  .tag .caption {
    position: relative;
    display: block;
    height: 20px;
    line-height: 20px;
    margin: 5px;
    font-size: 10px;
    color: #82879b;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tag .caption:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 200%;
    height: 200%;
    border: 1px solid #82879b;
    border-radius: 20px;
    transform-origin: 0 0;
    transform: scale(.5);
    box-sizing: border-box;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;h2&gt; English &lt;/h2&gt;
  
  &lt;div class="tags"&gt;
     &lt;div class="tag"&gt;&lt;span class="caption"&gt;You&lt;/span&gt;&lt;/div&gt;
     &lt;div class="tag"&gt;&lt;span class="caption"&gt;see&lt;/span&gt;&lt;/div&gt;
     &lt;div class="tag"&gt;&lt;span class="caption"&gt;it's&lt;/span&gt;&lt;/div&gt;
     &lt;div class="tag"&gt;&lt;span class="caption"&gt;in android&lt;/span&gt;&lt;/div&gt;
  &lt;/div&gt;
  
  &lt;h2&gt; Chinese &lt;/h2&gt;
  
  &lt;div class="tags"&gt;
     &lt;div class="tag"&gt;&lt;span class="caption"&gt;中&lt;/span&gt;&lt;/div&gt;
     &lt;div class="tag"&gt;&lt;span class="caption"&gt;文&lt;/span&gt;&lt;/div&gt;
     &lt;div class="tag"&gt;&lt;span class="caption"&gt;对&lt;/span&gt;&lt;/div&gt;
     &lt;div class="tag"&gt;&lt;span class="caption"&gt;齐&lt;/span&gt;&lt;/div&gt;
  &lt;/div&gt;
  
  &lt;h2&gt; Japanese &lt;/h2&gt;
  
  &lt;div class="tags"&gt;
     &lt;div class="tag"&gt;&lt;span class="caption"&gt;エネルギッシュな&lt;/span&gt;&lt;/div&gt;
     &lt;div class="tag"&gt;&lt;span class="caption"&gt;サニー&lt;/span&gt;&lt;/div&gt;
     &lt;div class="tag"&gt;&lt;span class="caption"&gt;ハロー&lt;/span&gt;&lt;/div&gt;
     &lt;div class="tag"&gt;&lt;span class="caption"&gt;ばか&lt;/span&gt;&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>