JSFiddle - React, Tailwind, and code Playground
by Hendra Nucleo
HTML
<div class="body clearfix">
<div class="inner clearfix">
<div id="appInfoDiv">First Div</div>
<div id="appImgDiv">Second Div</div>
</div>
</div>
CSS
.body {
display:block;
position:relative;
width:300px;
height:200px;
border:1px solid red;
}
.inner {
position:absolute;
left:50%;
margin-left:-60px;
top:50%;
margin-top:-25px;
width:120px;
height:50px;
background:green;
max-width:1400px;
box-sizing:border-box;
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
padding: 4px 0;
}
#appInfoDiv{
float: left;
width: 60%;
height:40px;
background-color: black;
}
#appImgDiv{
float: left;
width: 40%;
height:40px;
background-color: red;
}
.clearfix {
*zoom: 1; }
.clearfix:before, .clearfix:after {
content: " ";
display: table; }
.clearfix:after {
clear: both; }