Inside a Bootstrap 4 container, I have a div box that I want to scroll along with the nested content as I am scrolling. However, I want this movement to be confined within the boundaries of the respective Bootstrap 4 container. Ideally, I would like it to stop at a predetermined height in both Y directions within the Bootstrap 4 container. See example image here.
The specific div element I want to move vertically while scrolling is identified by the id "solutions-container" located inside
<div class="col-sm-12 col-md-6 col-lg-6 col-xl-6"></div>
Ideally, I prefer a vanilla JavaScript solution as I am still in the learning process.
You can find relevant sections of the webpage's HTML code below. The CSS will be available on fiddle along with some incomplete JS code due to uncertainty in how to proceed.
<!-- SECTION 2 -->
<!--PRODUCTS AND SERVICES SECTION-->
<div class="products-services-container container-fluid">
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-6 col-xl-6">
<div class="product-image-container1">
<img id="prodimg1" class="product-images prodimg1 img-fluid"src="images/Production-icons/cnc.png" alt="">
<img id="prodimg2" class="product-images prodimg2 img-fluid" src="images/Production-icons/Sand-casting.png" alt="">
<img id="prodimg3" class="product-images prodimg3 img-fluid"src="images/Production-icons/cnc.png" alt="">
<img id="prodimg4" class="product-images prodimg4 img-fluid" src="images/Production-icons/Sand-casting.png" alt="">
<img id="prodimg5" class="product-images prodimg5 img-fluid"src="images/Production-icons/cnc.png" alt="">
<img id="prodimg6" class="product-images prodimg6 img-fluid" src="images/Production-icons/Sand-casting.png" alt="">
</div>
</div><!--/ .col -->
<div class="col-sm-12 col-md-6 col-lg-6 col-xl-6">
<div id="solutions-container" class="solutions-container">
<!--THE BLACK IN THE BLUE BLOCK (div)-->
<div class="solutions-inside">
<h3 class="solutions-header text-left">Our Solutions</h3>
<h5 class="solutions-para text-left">
CNC Precision Machined Components Assemblies
High Pressure Die Castings
Grey & Ductile Iron Castings
Steel Castings
Investment Precision Castings
Aluminum Castings
Bronze and Brass Castings
Forged Components
Sheet Metal Components
</h5>
</div><!--/ .solutions-inside -->
</div><!--/ .solutions-container -->
</div><!--/ .col -->
</div><!--/ .row -->
</div><!--/ .container-fluid -->