Viewport navigation bar

How do I put the navigation bar at very top of the page i’m so close but not there I tried margin bottom but that didn’t work.

p.article-1{
	font-family: sans-serif;

}

p.article-2{
	font-family: sans-serif;
}
ol{
	font-family: sans-serif;
}

h1{
	text-align: center;
	margin-left:30px;
}

p.article-3{
	font-family: sans-serif;
}

div.safety{
	margin-left:450px;
	
}
div.room{
	margin-left: 450px;
}

}
nav ul{
	margin: 0;
	padding: 0;
	list-style: none;
	

	
}
 ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color:  #0072bbff;
}

li {
  float: left;
}

li a {
  display: block;
  color: white;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

/* Change the link color to #111 (black) on hover */
li a:hover {
  background-color:  #0072bbff;
}
.active {
  background-color: #4CAF50;
}
li {
  border-right: 1px solid #bbb;
}

li:last-child {
  border-right: none;
}

<div class="container">	
         	<img src="">


         <nav>
         	<ul>
         	<li><a href="#">Home</a></li>
         	<li><a  href="#" class="active">Learn More</a></li>
         	<li><a href="#">Discount Coupon</a></li>
         </ul>
         </nav>
     </div>
  

</head>

Hello @_manual.

I hope your nav is not inside head tag . It would be easier to help if you created a code sandbox of your project on codepen and provided a link to it.

If you always want your nav to stick to the top of the page (I believe that is what you want), then you can use fixed positioning.

 nav{
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999; /* Choose an appropriate value for z-index */
   }