Check out example codes for "fixed within the div css". It will help you in understanding the concepts better.

Code Example 1

#wrapper { width: 300px; background: orange; margin: 0 auto; position: relative; }
#feedback { position: fixed; right: 0; top: 120px; }

<div id="wrapper">
    ...
    <a id="feedback" href="#">Feedback</a>
</div>

Learn ReactJs, React Native from akashmittal.com