0

You may click here to see my code.

I want to make the following div can be scrollable:

<div className="m-0 p-0">
  {a}
</div>  

I tried the following:

<div className="d-flex flex-column-reverse flex-wrap m-0 p-0">
   {a}
</div>

But no luck, would you help me to fix the problem?

The KNVB
  • 3,588
  • 3
  • 29
  • 54
  • Note that adding a link to a live example *in addition* to having code in the question is welcomed, that shouldn't take the place of having [minimal sample code](http://sscce.org/) in the question itself, both so the question is self-contained and in case the linked page goes down, goes away or gets edited. For HTML, CSS an JS, the [Snippet](//meta.stackoverflow.com/q/269753/90527) feature allows you to create a [live example](//meta.stackoverflow.com/q/358992/90527) on SO itself. – outis Aug 03 '22 at 18:18

1 Answers1

0

apply overflow-y: scroll or overflow-y: auto css property to this div

<Card className="border border-danger ii position-absolute">
  <Card.Header>Header</Card.Header>
  <Card.Body className="m-0 p-0 position-relative">
    <div className="border border-primary d-flex flex-row h-100 position-absolute w-100 **overflow-auto**">
      <div className="border border-warning w-50">
        a
        <div className="m-0 p-0">
          {a}
        </div>  
      </div>
      <div className="border border-warning w-50">
        b
        <div className="m-0 p-0 overflow-auto">
          {a}
        </div>
      </div>
    </div>
  </Card.Body>
  <Card.Footer>Footer</Card.Footer>
</Card>
remonke
  • 251
  • 3
  • 6