I want to use the bootstrap assembler in the same way as "How to format" on the right side of the Ask a question on the stack page .
I can make it attached to the viewport by adding css .affix { top: 70px }and using class='affix' data-spy='affix'in html, but what if I want the affix element to be attached to the parent element?
For example, if I have such html:
<div class='affix-container'>
<div class='left-panel'>
some form, including a textarea
</div>
<div class='right-panel affix' data-spy='affix'>
how to format
</div>
</div>
I would like it to right-panelbe attached only relatively affix-container, so when I scroll down, if affix-containerit is still in the viewport, then add right-panel, otherwise let it right-panelscroll up.
Can I do this if the affix container is changed? i.e. Does its size / height increase with resizing of the text area contained in it?
swang source
share