Align menu text to bottom of li - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu

Description

Align menu text to bottom of li

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">
.head {<!--from  www .  j  ava 2 s  . c o m-->
   text-align:center;
   height:151px
}

.head:before {
   content:'';
   display:inline-block;
   height:100%;
   vertical-align:middle;
   margin-right:-0.26em
}

.logo {
   display:inline-block;
   vertical-align:middle;
   height:100px;
   width:351px;
}

.nav {
   display:inline-block;
   vertical-align:middle;
   height:100px;
   width:601px;
}

.icon-top {
   line-height:30px;
   padding-right:21px;
   color:Chartreuse;
   font-size:16px;
   text-align:right;
}

.menu {
   position:relative;
   text-align:right;
}

.menu-header {
   height:51px;
}

.topmenu {
   display:inline-block;
   height:66px;
   margin:0;
   padding:0;
   font-size:21px;
}

.topmenu li {
   display:inline-block;
   height:100%;
   list-style:none;
   margin-left:21px;
   border:2px solid yellow;
}

.topmenu li a {
   color:blue;
   position:relative;
   top:47px;
}

.topmenu li a:hover {
   color:pink;
}
</style> 
 </head> 
 <body> 
  <div class="head"> 
   <div class="logo"> 
    <a href="/" title="Back to homepage"> <img src="https://www.java2s.com/style/demo/Firefox.png"> </a> 
   </div> 
   <div class="nav"> 
    <div class="icon-top"> 
     <span>(999)999-9999 / (999)999-9999</span> 
    </div> 
    <div class="menu"> 
     <ul class="topmenu"> 
      <li> <a href="a.php">Abyssinian</a> </li> 
      <li> <a href="b.php">Munchkin</a> </li> 
      <li> <a href="c.php">Persian</a> </li> 
      <li> <a href="d.php">Siamese</a> </li> 
      <li> <a href="e.php">About</a> </li> 
     </ul> 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials