JSFiddle - React, Tailwind, and code Playground

by orjan

HTML

<div class="container">
  <div class="grid">
    <div class="top">
      <h1>
        Big ass header
      </h1>
    </div>
    <div class="bottom">
      Menu
    </div>
  </div>
</div>

<div class="container">
  <div class="flex">
    <div class="row">
      <div class="column top">
        <h1>
          Big ass header
        </h1>
      </div>
    </div>
    <div class="row">
      <div class="column bottom">
        Menu
      </div>
    </div>
  </div>
</div>

CSS

.container {
  background-color: grey;
  height: 200px;
  margin-bottom: 5em;
}

.flex {
  display: flex;
  text-align: center;
  justify-content: center;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  padding: 0;
  height: 100%;
}

.row {
  text-align: center;
  justify-content: center;
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100% !important;
  padding: 0;
}

.column {
  width: 100%;
}

.grid {
  display: grid;
  height: 100%;
  grid-template-columns: 1fr;
  grid-column-gap: 0;
  grid-row-gap: 0;
  grid-auto-flow: dense;
  grid-template-rows: auto 50px;
}

.top {
  background-color: yellow;
  display: flex;
  align-items: center;
  padding: 2em 0;
}

.bottom {
  background-color: red;
  display: flex;
  align-items: flex-end;
}