I'm completely new to this subject.
Currently, I've been following an online tutorial on HTML/CSS/Bootstrap.
One thing I want to do is move the navbar to the top right of the page, like what you see in the image below. I manually added a mockup of how I expect it to look:
https://i.sstatic.net/Qd7cA.jpg
However, instead of appearing on the right side where I want it, it's actually showing up on the left, right above the content as shown...
After doing some research on my own, I found that in order to fix it, I need to add the following code:
<ul class="navbar-nav mr-auto">
Inside the existing code:
<ul class="navbar-nav">
But for some reason, it's not working. Any idea what could be causing the issue?
Here is the code snippet I am currently using:
* {
margin: 0;
padding: 0;
}
body {
font-family: sans-serif;
}
#nav-bar {
position: sticky;
top: 0;
z-index: 10;
}
<!-- Rest of the CSS code and HTML structure follows -->