Navbar with logo in middle - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Nav bar image

Description

Navbar with logo in middle

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">
html, body {
   padding:0;
   margin:0;
}

#nav {<!--  w  ww  .j  a  v  a2 s. com-->
   margin:auto;
   background-color:Chartreuse;
   height:67px;
   box-shadow:0px 2px 11px yellow;
   position:relative;
}

#logo {
   position:absolute;
   top:0;
   left:51%;
   margin-left:-??px;
}

.navigation-left {
   list-style-type:none;
   position:absolute;
   right:51%;
   margin-right:??px
}

.navigation-right {
   list-style-type:none;
   position:absolute;
   left:51%;
   margin-left:??px
}

li {
   display:inline;
   padding:16px;
   margin:auto;
}

#nav a {
   font-size:2.7em;
   text-transform:uppercase;
   text-shadow:0 0 0.4em blue;
   font-weight:bold;
   font-family:century gothic;
   text-decoration:none;
   color:pink;
   opacity:0.27;
}

#nav a:hover {
   opacity:0.37;
}
</style> 
 </head> 
 <body> 
  <div id="nav"> 
   <ul class="navigation-left"> 
    <li> <a href="#">Lore</a> </li> 
    <li> <a href="#">Lorem </a> </li> 
   </ul> 
   <img src="https://www.java2s.com/style/demo/Firefox.png" id="logo"> 
   <ul class="navigation-right"> 
    <li> <a href="#">Lorem ipsum dolor sit </a> </li> 
   </ul> 
  </div> 
  <!-- end of nav -->  
 </body>
</html>

Related Tutorials