JSFiddle - React, Tailwind, and code Playground

Responsive Table

by Jennifer Perrin

HTML

<div class="wrap">

    <table class="comparison-table">
        <thead>
            <tr>
                <td></td>
                <td></td>
                <td class="marker">Package 1</td>
                <td class="marker">Package 2</td>
                <td class="marker">Package 3</td>
            </tr>
        </thead>
        <tr>
            <td>Item 1</td>
            <td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Provident laudantium.</td>
            <td class="marker">✔</td>
            <td class="marker">✔</td>
            <td class="marker">✔</td>
        </tr>
        <tr>
            <td>Item 2</td>
            <td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quasi quaerat.</td>
            <td class="marker">✔</td>
            <td class="marker">✔</td>
            <td class="marker">✔</td>
        </tr>
        <tr>
            <td>Item 3</td>
            <td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Neque maxime.</td>
            <td class="marker">✔</td>
            <td class="marker">✔</td>
            <td class="marker">✔</td>
        </tr>
        <tr>
            <td>Item 4</td>
            <td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nemo hic.</td>
            <td class="marker">✔</td>
            <td class="marker">✔</td>
            <td class="marker">✔</td>
        </tr>
        <tr>
            <td>Item 5</td>
            <td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam laborum!</td>
            <td class="marker">✔</td>
            <td class="marker">✔</td>
            <td class="marker">✔</td>
        </tr>
        <tr>
            <td>Item 6</td>
            <td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea quidem.</td>
            <td class="marker">✖</td>
            <td class="marker">✔</td>
            <td class="marker">✔</td>
        </tr>
        <tr>
            <td>Item 7</td>
            <td>Lorem ipsum dolor sit amet,...

CSS

@charset "UTF-8";
* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

html {
  font-size: 10px;
}

body {
  font-family: calibri, tahoma, arial, sans-serif;
  padding: 20px;
  font-size: 14px;
  font-size: 1.4rem;
  color: #555;
}

.wrap {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.intro {
  position: fixed;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  margin: 0 auto;
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 24px;
  font-size: 2.4rem;
  color: #34b7f0;
  text-align: center;
  background: white;
  -webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.5);
  -moz-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.5);
}

h3.table-title {
  color: #34b7f0;
  font-weight: normal;
  margin: 40px 0 0 10px;
  font-size: 32px;
  font-size: 3.2rem;
}

.comparison-table {
  display: block;
  width: 100%;
  padding: 10px;
  border-collapse: separate;
}
.comparison-table thead tr {
  color: #34b7f0;
  font-weight: bold;
  font-size: 16px;
  font-size: 1.6rem;
}
.comparison-table thead tr td {
  padding-bottom: 10px;
}
.comparison-table thead tr td {
  border: none !important;
}
@media (max-width: 767px) {
  .comparison-table thead tr {
    font-size: 14px;
    font-size: 1.4rem;
    font-weight: normal;
  }
}
.comparison-table tr {
  width: 100%;
}
.comparison-table tr td {
  border-right: 2px solid #34b7f0;
}
.comparison-table tr:first-child td {
  border-top: 2px solid #34b7f0;
}
.comparison-table tr:first-child td:first-child {
  -moz-border-radius-topleft: 5px;
  -webkit-border-top-left-radius: 5px;
  border-top-left-radius: 5px;
}
.comparison-table tr:first-child td:last-child {
  -moz-border-radius-topright: 5px;
  -webkit-border-top-right-radius: 5px;
  border-top-right-radius: 5px;
}
.comparison-table tr:last-child td {
  border-bottom: 2px solid #34b7f0;
}
.comparison-table tr:last-child td:first-child {
  -moz-border-radius-bottomleft: 5px;
 ...

JavaScript

$(document).ready(function() {
  $('.intro').delay(10000).fadeOut(1000);
});