'sticky sidebar not working during scrolling

I want to have a sticky sidebar during scrolling and I have tried many methods but it is not working. here is my code

 <div class="row">

        <div class="col me-0 me-md-3 mb-3 mb-md-0 px-0 ">

            <div class="position-relative" style="top: 0;
                left: 0;
                width: 100%;


                <div class="bg-white b-r-s-cont shadow pb-4 position-sticky top-0">
               height: 100%;">
         </div>
         </div>
      </div>
        <div class="col-12 col-md-9">
       </div>
</div>


Solution 1:[1]

You might want to try adding position: fixed; to the element that is supposed to be sticky.

You can simply add it it the current style="..." tag!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Just5MoreMinutes