JSFiddle - React, Tailwind, and code Playground

by RenaissanceDesign

HTML

<h1>Float Demo</h1>
<div class="container">
    <p class="float">
        This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. 
    </p>
    <p class="float">
        This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. 
    </p>
</div>
        <p class="separator">The floated elements contribute no height to their container. To force the container to expand to contain the floats, we must apply a clearing fix:</p>
        <div class="container cleared">
    <p class="float">
        This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily.
    </p>
    <p class="float">
        This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily. This is a float, see how it floats floatily.
    </p>
</div>

CSS

.container {
    border: 1px solid red;
    margin: 10px;
}

.float {
    float: left;
    margin: 0 10px;
    padding: 10px;
    border: 1px solid blue;
    width: 250px;
}

.cleared {
    overflow: hidden;
}

.separator {
 clear: both;   
}