Align list elements to the container bottom element - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Parent Container

Description

Align list elements to the container bottom element

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">
#access {<!--from ww w .ja  v a2s. c o  m-->
   background:Chartreuse;
}

#access ul {
   list-style:none;
   margin:0;
   padding-left:0;
}

#access li {
   position:relative;
   display:inline-block;
   vertical-align:bottom;
}

#access a {
   color:yellow;
   text-decoration:none;
   display:inline-block;
   padding:2em;
}

#access li:hover>a, #access a:focus {
   background:blue;
   color:pink;
}
</style> 
 </head> 
 <body> 
  <nav id="access" role="navigation"> 
   <div class="menu-menu-1-container"> 
    <ul id="menu-menu-1" class="menu"> 
     <li> <img id="brand-img" src="https://www.java2s.com/style/demo/Opera.png"> </li> 
     <li id="menu-item-54" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-51 current_page_item menu-item-54"> <a href="#">start</a> </li> 
     <li id="menu-item-55" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-55"> <a href="#">example</a> </li> 
     <li id="menu-item-56" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-56"> <a href="#">Example</a> </li> 
    </ul> 
   </div> 
  </nav>  
 </body>
</html>

Related Tutorials