Center Logo in Menu - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu

Description

Center Logo in Menu

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">
#menuContainer {<!--   w  w w. j  a  v a2s .c  o  m-->
   position:fixed;
   width:100%;
   background-color:Chartreuse;
}

#menu img {
   height:5%;
   background-color:yellow;
   border-radius:100%;
   padding:6px
}

#menu {
   margin-left:auto;
   margin-right:auto;
}

#menu .menu-logo img {
   padding:11px;
   border-radius:51%;
   background:red;
   margin-bottom:-21px;
}
</style> 
 </head> 
 <body> 
  <div id="menuContainer"> 
   <table id="menu"> 
    <tbody> 
     <tr> 
      <td>Lore</td> 
      <td class="menu-logo"> <img src="https://www.java2s.com/style/demo/Opera.png"> </td> 
      <td>Lorem</td> 
     </tr> 
    </tbody> 
   </table> 
  </div>  
 </body>
</html>

Related Tutorials