Add navbar-fixed-top class to fixed the navbar.
<nav class="navbar navbar-expand-lg navbar-light text-center navbar-fixed-top">
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm a novice with navbar. I'm using bootstrap 4.3.1, and want to use the code I learned in a class to be static at the top.
I hope this doesn't get difficult! Can this be done with a minimum of work?
I attached the code because when I include it here, I get access denied.
162930-code-sample.txt
Any advice would be appreciated!
Add navbar-fixed-top class to fixed the navbar.
<nav class="navbar navbar-expand-lg navbar-light text-center navbar-fixed-top">
Thank you for your suggestion. I am very puzzled why it didn't work. I even tried "navbar-static-top" and nothing works at all.
I know that the <nav>div is wrapped with the <header> div.
If I tweak the <header> div then I get some results, but I break other things. Right now there's no classes declared for <header>.
Any thoughts?
(This is using MVC Core)
This works:
<header class="sticky-lg-top">
But I hear that sticky-top isn't necessarily supported on other browsers.