.scrollspy-example { position: relative; height: 250px; overflow: auto; } <body> <div class="row"> <div class="col-sm-3" id="spy"> <ul class="nav nav-pills flex-column"> <li class="nav-item"><a class="nav-link active" href="#scroll1">First Section</a></li> <li class="nav-item"><a class="nav-link" href="#scroll2">Second Section</a></li> <li class="nav-item"><a class="nav-link" href="#scroll3">Third Section</a></li> <li class="nav-item"><a class="nav-link" href="#scroll4">Fourth Section</a></li> </ul> </div> <div class="col-sm-9 scrollspy-example" data-spy="scroll" data-target="#spy"> <div id="scroll1"> <h2>First Section</h2> <p> During Compile time, the compiler converts the source code into Microsoft Intermediate Language (MSIL). Microsoft Intermediate Language (MSIL) are CPU-Independent set of instructions that can be effectively converted to the native code. Now with the help of JIT compiler, IL code can be executed on any computer architecture supported by the JIT compiler. </p> </div> <div id="scroll2"> <h2>Second Section</h2> <p> During Compile time, the compiler converts the source code into Microsoft Intermediate Language (MSIL). Microsoft Intermediate Language (MSIL) are CPU-Independent set of instructions that can be effectively converted to the native code. Now with the help of JIT compiler, IL code can be executed on any computer architecture supported by the JIT compiler. </p> </div> <div id="scroll3"> <h2>Third Section</h2> <p> During Compile time, the compiler converts the source code into Microsoft Intermediate Language (MSIL). Microsoft Intermediate Language (MSIL) are CPU-Independent set of instructions that can be effectively converted to the native code. Now with the help of JIT compiler, IL code can be executed on any computer architecture supported by the JIT compiler. </p> </div> <div id="scroll4"> <h2>Fourth Section</h2> <p> During Compile time, the compiler converts the source code into Microsoft Intermediate Language (MSIL). Microsoft Intermediate Language (MSIL) are CPU-Independent set of instructions that can be effectively converted to the native code. Now with the help of JIT compiler, IL code can be executed on any computer architecture supported by the JIT compiler. </p> <p> During Compile time, the compiler converts the source code into Microsoft Intermediate Language (MSIL). Microsoft Intermediate Language (MSIL) are CPU-Independent set of instructions that can be effectively converted to the native code. Now with the help of JIT compiler, IL code can be executed on any computer architecture supported by the JIT compiler. </p> <p> During Compile time, the compiler converts the source code into Microsoft Intermediate Language (MSIL). Microsoft Intermediate Language (MSIL) are CPU-Independent set of instructions that can be effectively converted to the native code. Now with the help of JIT compiler, IL code can be executed on any computer architecture supported by the JIT compiler. </p> <p> During Compile time, the compiler converts the source code into Microsoft Intermediate Language (MSIL). Microsoft Intermediate Language (MSIL) are CPU-Independent set of instructions that can be effectively converted to the native code. Now with the help of JIT compiler, IL code can be executed on any computer architecture supported by the JIT compiler. </p> </div> </div> </div> </body>