Align logo with navigation menu item - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu Item

Description

Align logo with navigation menu item

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 a  2 s  .co m-->
   margin:0;
}

header {
   background-color:Chartreuse;
   height:86px;
   position:relative;
}

#front {
   margin-left:21px;
   margin-top:21px;
}

nav {
   display:inline-block;
}

ul {
   margin:0;
   padding:0;
   float:left;
}

ul li {
   list-style-type:none;
   float:left;
   border-right:3px solid yellow;
   padding-right:6px;
   padding-left:6px;
}

ul li.last {
   border-right:0px;
}

#second_line {
   margin-top:11px;
   height:4px;
   background-color:blue;
}
</style> 
 </head> 
 <body> 
  <header> 
   <img src="https://www.java2s.com/style/demo/InternetExplorer.png" height="50px" id="front"> 
   <nav> 
    <ul> 
     <li> <a href="#">Lore</a> </li> 
     <li> <a href="#">Lorem</a> </li> 
     <li class="last"> <a href="#">Lorem i</a> </li> 
    </ul> 
   </nav> 
   <div id="second_line"></div> 
  </header>  
 </body>
</html>

Related Tutorials