JSFiddle - React, Tailwind, and code Playground
by UnsungHero97
HTML
<div id="wrapper">
<div id="box-left">
<div id="left"></div>
</div>
<div id="box-middle">
<div id="center"></div>
</div>
</div>
CSS
html, body {
margin: 0 !important;
padding: 0 !important;
}
#box-middle, #box-left {
width: 50%;
float: left;
}
#wrapper {
width: 100%;
}
#left {
border: 1px solid magenta;
height: 50px;
width: 50px;
position: relative;
left: 50%;
margin-left: -75px; /* half of width of this element + half of margin-left of centered box */
}
#center {
border: 1px solid magenta;
height: 50px;
width: 200px;
margin-left: -100px;
}