By setting
position:fixed;
will not suffice your need. It will fix the position to fixed points. You need to write some scripts to make it sticky on scroll or you can use any third party plugins to achieve the same.
There are lot of plugins available to make sticky elements.
For example you can refer below plugins:
StickyJS
StickyMojo/
Using CSS and jQuery
Lists of Sticky Scroll Plugins
There are plenty of the plugins available that you can use to achieve your requirement.
Hope this helps!