JSFiddle - React, Tailwind, and code Playground

by audetwebdesign

HTML

<div class="parent">
    <ul class="list">
        <li>text</li>
        <li>text</li>
        <li>text</li>
        <li>text</li>
    </ul>
</div>
<br>
<div class="parent row-of-4">
    <ul class="list list-justified">
        <li>text</li>
        <li>texting </li>
        <li>text wider</li>
        <li>end of line</li>
    </ul>
</div>

CSS

* {
    -webkit-box-sizing: border-box;
    /* Safari/Chrome, other WebKit */
    -moz-box-sizing: border-box;
    /* Firefox, other Gecko */
    box-sizing: border-box;
}
.parent {
    border: 1px #aaa solid;
}
.list {
    padding:0;
    margin:0;
    list-style-type:0;
    overflow: hidden;
    height: 42px;
}
.list li {
    display: inline-block;
    line-height: 40px;
    padding: 0 5px;
    border:1px green solid;
    margin:0;
    text-align:center;
}
.row-of-4 .list li { width: 24%; }
.row-of-5 .list li { width: 19%; }
.row-of-6 .list li { width: 16%; }

.list-justified {
    text-align: justify;
}
.list-justified:after {
    content:"";
    display: inline-block;
    font-size: 0;
    line-height: 0;
    width: 100%;
}