CSS Position

position: fixed;

Check out this text. It has position: fixed;

Scroll and notice how the text with blue background remains fixed in the specified position

In the example, the fixed text has following styles:
div.fixed { position: fixed; top: 40vh; right: 25vw; left: 25vw; }