JSFiddle - React, Tailwind, and code Playground
HTML
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<strong>Should be:</strong>
<span></span>
CSS
body, html {
margin:0;
padding:0;
}
div {
float: left;
padding: 5px 0;
width: 16.666%;
background: rgba(0,0,0,.2);
height: 100px;
text-align: center;
-moz-box-shadow: inset 0 0 2px 2px rgba(0,0,0,.5);
-webkit-box-shadow: inset 0 0 2px 2px rgba(0,0,0,.5);
box-shadow: inset 0 0 2px 2px rgba(0,0,0,.5);
}
JavaScript
$(window).resize(function(){
$("div").each(function(){
var $that = $(this);
$that.text($that.width() + "px")
});
$("span").text(($(document).width()/6) + "px");
});