Left and right two-column layout, floating on the left and floating content on the right. Please tell me how to write this layout.

description of the problem, the background of the problem and what methods you have tried

the actual effect I wrote: https://codepen.io/piscdong/p.

left and right two-column layout. Now the orange on the left is floating, and there are a number of unknown white floating div
in the red part on the right. The problem now is, the red part on the right. I originally hoped that I could adapt to the height according to the content inside, but now it seems to be as high as the left.
how should this situation be changed? thank you

.

related codes

html

<div class="top">
  <div class="left"></div>
  <div class="right">
    <div class="right_1">
      <div class="block"></div>
      <div class="block"></div>
      <div class="block"></div>
      <div class="block"></div>
    </div>
    <div class="right_2"></div>
  </div>
</div>
<div class="bottom"></div>

css

.top {
  background: -sharpeee;
}
.top:after {
  content: "";
  display: block;
  clear: both;
}
.left {
  float: left;
  width: 200px;
  height: 200px;
  background: -sharpf90;
}
.right {
  margin-left: 210px;
  background: -sharp036;
}
.right_1 {
  background: -sharp900;
}
.right_1:after {
  content: "";
  display: block;
  clear: both;
}
.block {
  float: left;
  width: 100px;
  height: 100px;
  margin: 5px;
  background: -sharpfff;
}
.right_2 {
  height: 20px;
  background: -sharp009;
}
.bottom {
  background: -sharpccc;
  height: 20px;
}

solution

Thank you @ Haiiz for your answer. The solution is as follows

css

.right {
  float: right;
  width: calc(100% - 210px);
  background: -sharp036;
}

actual effect: https://codepen.io/piscdong/p.

Css
Jul.26,2021

2 methods:
1, you should also set the right side to float, otherwise you cannot adapt the height;
2, you set the left side to position, so that the right side can adapt to the height;
ps: float will affect the following elements


you have no height on the right side, and the right side has the adaptive height

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e98226-463f6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e98226-463f6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?