JSFiddle - React, Tailwind, and code Playground

by Tyler N.

HTML

<div class="table-header">
  <div>Title</div>
  <div>Title</div>
  <div>Title</div>
  <div>Title</div>
</div>
<div class="table">
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
</div>

CSS

.table div:nth-child(8n+2),
.table div:nth-child(8n+4),
.table div:nth-child(8n+5),
.table div:nth-child(8n+7) {
  background-color: black;
}

.table div {
  float: left;
  width: 25%;
  height: 30px;
  margin:0;
}

.table {
  width: 600px;
  border: 1px solid black;
}

.table:after,
.table-header:after{
  content: '';
  display: block;
  clear: both;
  height: 0;
  line-height: 0;
}

.table-header {
  width: 600px;
  background-color: pink;
  border-top: 1px solid black;
}

.table-header div {
  width: 25%;
  float: left;
  text-align: center;
  border-left: 1px solid black;
}

.table-header div:last-child {
  border-right: 1px solid black;
}

div {
  box-sizing: border-box;
}

JavaScript

alert('Yahoo for the codes! ... Yahoo for Halloween! (thank Billy Madison)');