HTML menu right alignment - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu

Description

HTML menu right alignment

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">
#menu {<!--from w  w w .  j a  v a  2 s  .  co  m-->
   padding:6px;
   background-color:Chartreuse;
}

#menucenter {
   padding:11px;
   padding-bottom:0px;
   position:relative;
}

#menucenter ul {
   list-style-type:none;
   margin:0px;
   padding:6px;
   overflow:scroll;
   background-color:yellow;
}

#menucenter li {
   float:left;
   padding-bottom:7px;
}

#menucenter li.right {
   float:right;
}

#menucenter li.highlight {
   top:43px;
   border-bottom:4px solid blue;
   border-radius:3px;
   position:absolute;
}

#menucenter li a {
   display:inline;
   color:pink;
   text-align:center;
   padding:11px 17px;
   text-decoration:none;
   background-color:OrangeRed;
   border-bottom:2px solid grey;
}
</style> 
 </head> 
 <body> 
  <nav id="menu"> 
   <nav id="menucenter"> 
    <ul> 
     <li> <a href="index.html">Lorem ipsu</a> </li> 
     <li> <a href="index.html">Lorem ipsum</a> </li> 
     <li> <a href="secondarypages/schedule.html">Lorem </a> </li> 
     <li> <a href="secondarypages/places.html">Lorem ip</a> </li> 
     <li class="right"> <a href="secondarypages/places.html">Lorem ip</a> </li> 
    </ul> 
   </nav> 
  </nav>  
 </body>
</html>

Related Tutorials