tailwind center vertically code example

Example 1: horizontal align tailwind

<div class="flex items-center justify-center h-screen">
    
	<div class="bg-indigo-800 text-white font-bold rounded-lg border shadow-lg p-10">
		Centered Content
	</div>
	
  </div>

Example 2: tailwind flex align items center

<div class="flex items-center ...">
  <div>1</div>
  <div>2</div>
  <div>3</div>
</div>

Example 3: vertical align tailwind

Class               Properties
-----               ----------
align-baseline      vertical-align: baseline;
align-top           vertical-align: top;
align-middle        vertical-align: middle;
align-bottom        vertical-align: bottom;
align-text-top      vertical-align: text-top;
align-text-bottom   vertical-align: text-bottom;

Example 4: tailwind scroll vertical

<div class="overflow-y-auto h-32 ...">Lorem ipsum dolor sit amet...</div>

Example 5: tailwind center vertically

<span class="inline-block align-middle ...">...</span>

Tags:

Misc Example