Well understood. The container of the parent element must have position: relative , and navbar should have position: absolute , so if you attach either .navbar-fixed-top or .navbar-fixed-bottom , it will be fixed relative to the parent element and NOT relative to the whole page . Yes!
source share