JSFiddle - React, Tailwind, and code Playground

by hcarleton

HTML

<div class="parent">
    <div class="box"></div>
</div>

CSS

body { margin: 0; }
html {
    box-sizing: border-box;
    overflow-y: hidden;
}
*, *::before, *::after {
    box-sizing: inherit;
    position: relative;
}
.parent {
    background: rgba(0, 0, 0, .4);
    height: 100px;
    width: 5rem;
    margin-bottom: 25px;
}

.box {
    position: absolute;
    top: 0;
    left: 0;
    height: 50px;
    width: 100vw;
    background: rgba(0, 0, 0, .4);
    border: 2px solid red;
}