JSFiddle - React, Tailwind, and code Playground

by rgthree

HTML

<h2>Original</h2>
<div class="left">
    <p>This div has a fixed width of 300px.
        <p>
</div>
<div class="right">
    <p class="withMargin">This div.</p>
</div>
        
<h2>Inline-block breakage</h2>
<div class="left">
    <p>This div has a fixed width of 300px.
        <p>
</div>
<div class="right">
    <p class="withMargin -inline-blocked">This div.</p>
</div>

CSS

.left {
    background-color: yellow;
    width: 300px;
    height: 100%;
    float: left;
}
.right {
    background-color: pink;
    height: 100%;
    margin-left: 320px;
    overflow: visible;
}
p {
    margin: 0;
    padding: 10px;
    color: black;
}
p.withMargin {
    margin-top: 100px;
    margin-bottom: 100px;
    background:#F00;
}

.-inline-blocked {display:inline-block;}