I have experimented with float and display inline-block. While flex does work, it's not suitable for my needs as it will place every child div in a line, which is not the desired outcome. Essentially, I am looking to have a few boxes on the left side and one box on the right side that adjusts its height based on the height of the child divs on the left. I have attempted floating the boxChildRight to the right/left vice versa, but it has not been successful.
HTML
#sp {
position: absolute;
left: 400px;
top: 0;
}
#box {
width: 100%;
height: auto;
margin-top: 20px;
}
.boxChildRight {
right: 0;
width: 20%;
height: auto;
border: 1px solid;
position: relative;
float: right;
}
.boxChildLeft {
left: 0;
width: 80%;
height: 100px;
border: 1px solid;
margin-bottom: 2px;
position: relative;
float: left;
}
.prodInfo {
float: left;
margin-left: 10px;
}
.img {
margin-left: 0;
float: left;
}
<div id="box"> PARENT DIV
<div class="boxChildLeft"> CHILD
<div class="img">
<img src="../shopImages/candles.jpg" width="100px" height="100px">
</div>
<div class="prodInfo">
<p1>Test</p1><br>
<span id="sp"><p1>Test</p1></span>
</div>
</div>
<div class="boxChildLeft">
<div class="img">
<img src="../shopImages/candles.jpg" width="100px" height="100px">
</div>
<div class="prodInfo">
<p1>Test</p1><br>
<span id="sp"><p1>Test</p1></span>
</div>
</div>
<div class="boxChildLeft">
<div class="img">
<img src="../shopImages/candles.jpg" width="100px" height="100px">
</div>
<div class="prodInfo">
<p1>Test</p1><br>
<span id="sp"><p1>Test</p1></span>
</div>
</div>
<div class="boxChildLeft">
<div class="img">
<img src="../shopImages/candles.jpg" width="100px" height="100px">
</div>
<div class="prodInfo">
<p1>Test</p1><br>
<span id="sp"><p1>Test</p1></span>
</div>
</div>
<div class="boxChildRight"> THIS CHILD DIV SHOULD BE ON RIGHT SIDE OF ALL OTHER DIVS
</div>