Hello, I would like to do the following.
<div class="pai">
<div class="form"></div>
<div class="text"></div>
</div>
I have a DAD and inside it there are two div's side by side. The height of the div FORM depends on the amount of content that can vary. The height of the TEXT div is fixed. I want the div TEXT to be larger than the TEXT div, so the div TEXT is fixed scrolling next to the page but with a scrolling limit until the end of the FORM div.
Just like in the image if the div FORM is greater than the TEXT div and the page is rolled, the TEXT until you reach the end of the div FORM . It's like a navbar-fixed-top, but it will not scroll the whole site, but it will scroll until it is aligned with the FORM div, when aligning with the FORM
.
If you scroll up again, the div TEXT will scroll until you reach the top of the div FORM .
In short, always using FORM as a reference for the TEXT div that will only be fixed if the div FORM is larger.
Remembering that I'm using bootstrap, I almost got it with the affix, but when it aligns with the base of the div FORM instead of getting static aligned the base, it goes back to its original position.