JSFiddle - React, Tailwind, and code Playground
by whitewolf
HTML
<div id="con">
</div>
CSS
#con{
width:605px;height:100px;background-color:red;border:none;position:relative;
margin:10px;padding:0px;
}
#con div{
height:100px;background-color:green;position:absolute;
}
JavaScript
$(function() {
var width = $('#con').width();
var count = 69-15 +1;
var interval = width / count;
for (var i = 0; i < 55; i++) {
$('<div></div>').css({
left: (i * interval) + 'px',
right: (width - (i + 1) * interval) + 'px'
}).appendTo('#con');
}
})