I redesigned my website layout, dividing it into two sections: right and left. The left section contained 3 boxes, while the right section only had one. Initially, the height of the box on the right would adjust to match the combined height of the boxes on the left. However, I decided to add another box below the existing box on the right and now I want the same height adjustment for both new boxes - the total height of the two boxes on the right should always equal the total height of the three boxes on the left. Below is the code snippet that worked with just one box on the right:
<div class="right">
<div class="boxx details-history">
<div class="boxx-content">
Box content goes here
</div>
</div>
</div>
And here is the corresponding CSS:
.right{ float: right; display: inline; width:404px; position:relative; }
.boxx { margin-top:11px; }
.boxx:first-child { margin-top:0; }
.boxx .boxx-content { background: #fff; padding:4px 18px; color:#a7a7a7;
font-family: 'Roboto', sans-serif; font-weight:300; border-radius: 0 0 3px 3px; }
.details-history .boxx-content { padding: 0 0 0 0!important; position:absolute;
left:0; right:0; bottom:0; top:22px; }
Below is the new code snippet:
<div class="right">
<div class="boxx details-history">
<div class="boxx-content">
Box content goes here
</div>
</div>
<div class="boxx details-coursework">
<div class="boxx-content custom-scroll">
Box content goes here
</div>
</div>
</div>
I've been struggling for hours to write the CSS code to achieve this, but have not been successful so far. I believe the solution involves removing the 'position: absolute;' from .details-history and creating a new class called details-coursework, but I haven't been able to figure out the exact steps to take.