JSFiddle - React, Tailwind, and code Playground
HTML
<div class="Rtable">
<div style="order:1;" class="Rtable-cell"><h3>Eddard Stark</h3></div>
<div style="order:2;" class="Rtable-cell stripe">Has a sword named Ice</div>
<div style="order:3;" class="Rtable-cell">No direwolf</div>
<div style="order:4;" class="Rtable-cell stripe">Male</div>
<div style="order:5;" class="Rtable-cell"><strong>Lord of Winterfell</strong></div>
<div style="order:1;" class="Rtable-cell"><h3>Jon Snow</h3></div>
<div style="order:2;" class="Rtable-cell stripe">Has a sword named Longclaw</div>
<div style="order:3;" class="Rtable-cell">Direwolf: Ghost</div>
<div style="order:4;" class="Rtable-cell stripe">Male</div>
<div style="order:5;" class="Rtable-cell"><strong>Knows nothing</strong></div>
<div style="order:1;" class="Rtable-cell"><h3>Arya Stark</h3></div>
<div style="order:2;" class="Rtable-cell stripe">Has a sword named Needle</div>
<div style="order:3;" class="Rtable-cell">Direwolf: Nymeria</div>
<div style="order:4;" class="Rtable-cell stripe">Female</div>
<div style="order:5;" class="Rtable-cell"><strong>No one</strong></div>
</div>
CSS
.Rtable {
display: flex;
flex-wrap: wrap;
}
.Rtable-cell {
box-sizing: border-box;
flex: 33.33%;
margin: -1px 0 0 -1px;
padding: 5px 10px;
border: solid 1px slategrey;
}
h3 { margin: 0; }
/* NEW */
.stripe {
background-color: black;
color: white;
}
/* ADJUSTED */
@media all and (max-width: 500px) {
.Rtable { display: block; }
.stripe { background-color: white; color: black; }
.Rtable-cell:nth-child(even) { background-color: black; color: white;}
}