CSS Image in menu - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu

Description

CSS Image in menu

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <style>
.navgroups {<!--  w  w w . j a  v a  2 s  . co m-->
   font-family:tahoma;
   width:901px;
   margin:0 auto;
}

.navgroups li {
   float:left;
   list-style:none;
}

.navgroups .menu {
   display:table;
   margin:0 auto;
}

#bar {
   padding:0px;
   margin:0 auto;
   height:54px;
   background:Chartreuse;
}

.navgroups a {
   -webkit-transition:background 0.4s;
   -moz-transition:background 0.4s;
   -ms-transition:background 0.4s;
   -o-transition:background 0.4s;
   transition:background 0.4s;
   -webkit-border-radius:10px;
   -moz-border-radius:10px;
   border-radius:10px;
   padding:16px;
   text-align:center;
   color:yellow;
   text-decoration:none;
   width:auto;
   display:inline-block;
}

.navgroups a:hover, .navgroups a.active {
   background:blue;
   text-shadow:4px 4px 4px white;
}
</style> 
 </head> 
 <body> 
  <div id="bar"> 
   <div class="navgroups"> 
    <ul class="menu"> 
     <li> <a href="CPIL.html">Lorem ip</a> </li> 
     <li> <a href="#">Lor</a> </li> 
     <li> <a href="#">Lore</a> </li> 
     <li> <a href="#">Lorem i</a> </li> 
     <li> <img src="https://www.java2s.com/style/demo/Opera.png" height="53px"> </li> 
     <li> <a href="CPIL.html">Lorem ips</a> </li> 
     <li> <a href="#">Lorem </a> </li> 
     <li> <a href="#">Lorem </a> </li> 
     <li> <a href="#">Lorem ipsum</a> </li> 
    </ul> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials