I have a question about navbar-fixed-top. Well, I have a simple problem with it. My fixed navbar covers content, for example in \"About us\" page, it covers row with \"About us\
It's possible setting a variable for the paddingTop of the body to the height of the navbar could also work and is subsequently a bit more responsive than a fixed 60/65px value.
let padding = $("nav").height() + "px";
A practical example is the Bootstrap .navbar-toogler button and adding a click event to it and setTimeout function which allows the height to change then apply the new value as paddingTop to the body.
jQuery:
$(".navbar-toggler").click(function(){
setTimeout(function(){
let padding = $("nav").height() + "px";
$("body").css("paddingTop", padding)
}, 500)
})
vanillaJS:
document.querySelector(".navbar-toggler").onclick = function(){
setTimeout(function(){
let padding = document.querySelector("nav").offsetHeight + "px";
document.body.style.paddingTop=padding;
}, 500)
};