Border Width 100% of HTML and Responsive menu border and icon - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu

Description

Border Width 100% of HTML and Responsive menu border and icon

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
body {<!--from  w  w w .  j av  a2  s. c  om-->
   font-family:'Lato', sans-serif;
   font-size:2em;
   margin:0;
}

a {
   text-decoration:none;
}

header {
   padding:19px 0 19px 0;
   border-bottom:2px solid Chartreuse;
}

.nav-menu {
   text-align:right;
   margin-right:137px;
}

li {
   list-style:none;
   margin-right:31px;
   display:inline;
}

li a {
   color:yellow;
}

.active {
   color:blue;
}

.brand {
   float:left;
   margin-left:137px;
   margin-bottom:19px;
}

.menu-trigger {
   display:none;
}

@media screen and (max-width: 768px)  {
   .nav-menu {
      margin:0;
   }
   
   nav ul {
      margin:0;
      padding:0;
   }
   
   nav ul li {
      clear:both;
      display:block;
      margin-right:0;
      margin-bottom:19px;
      border-bottom:3px solid pink;
   }
   
   nav ul li:last-child {
      border-bottom:none;
   }
   
   .menu-trigger {
      display:block;
      float:right;
   }

}
</style> 
 </head> 
 <body> 
  <header> 
   <a href="index.html"> <img src="https://www.java2s.com/style/demo/Opera.png" alt="George Designs Logo" class="brand"> </a> 
   <img src="https://www.java2s.com/style/demo/Google-Chrome.png" alt="menu" class="menu-trigger"> 
   <nav class="nav-menu"> 
    <ul class="clearfix"> 
     <li> <a href="#" class="active">Lore</a> </li> 
     <li> <a href="#">Lore</a> </li> 
     <li> <a href="#">Lorem</a> </li> 
     <li> <a href="#">Lorem i</a> </li> 
    </ul> 
   </nav> 
  </header>  
 </body>
</html>

Related Tutorials