2

Given this code :

.container {
  width: 100%;
  display: flex;
  height: 100%;
  background-color: #003D5656
}

.piloted {
  flex: 33;
  background-color: #E6E6E6;
  overflow-y: scroll;
}

.pilote {
  flex: 77;
  background-color: #30AD63
}
<div class="container">
  <div class="piloted">
    <p>I</p>
    <p>want</p>
    <p>to</p>
    <p>be</p>
    <p>piloted</p>
    <p>by</p>
    <p>the</p>
    <p>second</p>
    <p>column</p>
  </div>
  <div class="pilote">
    <p>I</p>
    <p>am</p>
    <p>the</p>
    <p>pilot</p>
  </div>
</div>

How to make the right column pilot the left one height using flex box ? The overflow of the content of the left one should be scrollable.

Toto NaBendo
  • 290
  • 3
  • 26

0 Answers0