0

I'm trying to set position fixed of a div inside of parent div.

Like for example:

.parent-div {
  height: 500px;
}

.fixed {
  position: fixed;
}
<div class="container parent-div">
  <div class="container fixed">
    Test
  </div>
</div>

Goal is, if user scroll fixed class will only be sticky they are currently scrolling on parent-div

j08691
  • 197,815
  • 30
  • 248
  • 265
Pablo
  • 1,275
  • 1
  • 7
  • 28

0 Answers0