Skip to main content

Allineamento verticale

Cambia l’allineamento verticale di elementi inline, inline-block, inline-table e celle di tabella.

Cambia l’allineamento verticale, con le utilità di allineamento verticale di elementi inline, inline-block, inline-table e celle di tabella.

Puoi scegliere tra .align-baseline, .align-top, .align-middle, .align-bottom, .align-text-bottom, e .align-text-top.

Con elementi inline:

baseline top middle bottom text-top text-bottom
<span class="bg-primary text-white p-1 align-baseline">baseline</span>
<span class="bg-primary text-white p-1 align-top">top</span>
<span class="bg-primary text-white p-1 align-middle">middle</span>
<span class="bg-primary text-white p-1 align-bottom">bottom</span>
<span class="bg-primary text-white p-1 align-text-top">text-top</span>
<span class="bg-primary text-white p-1 align-text-bottom">text-bottom</span>

Con le celle di tabella:

baseline top middle bottom text-top text-bottom
<table style="height: 100px;" class="table table-bordered">
  <tbody>
    <tr>
      <td class="align-baseline">baseline</td>
      <td class="align-top">top</td>
      <td class="align-middle">middle</td>
      <td class="align-bottom">bottom</td>
      <td class="align-text-top">text-top</td>
      <td class="align-text-bottom">text-bottom</td>
    </tr>
  </tbody>
</table>