To place a logo next to navigation bar - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Nav bar image

Description

To place a logo next to navigation bar

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 {
   margin:0;
}

ul {<!-- w  w  w  .j  a va2 s .co  m-->
   list-style-type:none;
   margin:0;
   padding:0;
   overflow:hidden;
   background-color:Chartreuse;
}

ul img {
   height:51px;
   float:left;
}

li {
   float:left;
}

li a {
   display:block;
   color:yellow;
   text-align:center;
   padding:15px 17px;
   text-decoration:none;
}

li a:hover {
   background-color:blue;
}
</style> 
 </head> 
 <body> 
  <nav> 
   <ul> 
    <img src="https://www.java2s.com/style/demo/Firefox.png" alt=""> 
    <li> <a href="#">Lorem</a> </li> 
    <li> <a href="#">Lorem</a> </li> 
   </ul> 
  </nav>  
 </body>
</html>

Related Tutorials