How to center a navigation bar in HTML 5

How do you center a navigation bar in HTML 5?

You can do this with css:

nav{
    position: absolute;
    left:50%;
    top:0px;
    transform: translateX(-50%);
}

I tried it put the navigation bar at the top of the site

this is what i had originaly

#Navig ul li {
  display: inline-block;
  padding: 10px;
  text-align:center;
  margin-left:200px;
  overflow:hidden;
}

where do you want it?

Can you leave a link to your so i can fork it and try to help you

https://navajowhitedependabledatabase.adamarafa1.repl.co/__repl I think

https://replit.com/@AdamArafa1/NavajowhiteDependableDatabase?v=1
Thanks!

Try adding this:

#title{
    position: relative;
    left: 50%;
    transform: translate(-50%);
    width: calc(100% - 30px);
}

You can change the width to what ever you want.

It’s a bit primitive but this might work

<div style="text-align:center>
 <!--YOUR NAV BAR-->
</div>