menu

In this example below you will see how to do a menu with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by krte85, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright krte85 ©
  • HTML
  • CSS
  • JavaScript
    <ul class="mynav" id="myTopnav">
  <li><a herf="#home">HOME</a></li>
  <li><a herf="#news">NEWS</a></li>
  <li><a herf="#kontakt">KONTAKT</a></li>
  <li><a herf="#onas">O NAS</a></li>
  <li class="icon"><a herf="#puste">&#9776</a></li>





</ul>

/*Downloaded from https://www.codeseek.co/krte85/menu-xELVXm */
    .mynav{
  padding: 0;
  list-style:none;
  margin:0;
  overflow:hidden;
  background-color:silver;
  
  
}

.mynav li {
  float: left;
  
}

.mynav li a {
  display: inline-block;
  color:blue;
  text-align:center;
  padding: 14px 16px;
  text-decoration: none;
  transition: 0.5s;
  font-size: 17px;
}

.mynav li a:hover {
  background-color:yellow;
  
}

.mynav li.icon{
display:none;
}
.mynav  li.icon a{
  font-size: 24px;
  margin: 0;
  padding:0;
}
.mynav li.icon a:hover{
  padding:10px;
  font-size:30px
  
}

@media screen and (max-width:680px){

 .mynav li:not(:first-child){ display:none;} 
  
  .mynav li.icon{
    display: inline-block;
  }  
}
.resp-menu{
  float:none;
  
  
}




/*Downloaded from https://www.codeseek.co/krte85/menu-xELVXm */
    

Comments