This example is a quick exercise to illustrate how a sticky top navigation works. Also included is the responsive CSS and HTML, so it also adapts to your viewport and device.
To see the sticky navbar in action, just scroll.