List navigation - aligning to left and right - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Nav bar alignment

Description

List navigation - aligning to left and right

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">
#subnav {<!-- ww w  . j a v a 2s  . c o m-->
   margin-bottom:21px;
   font-family:Arial;
   font-size:14px;
   width:100%
}

#subnav li {
   border-radius:5px;
   display:inline-block;
   line-height:41px;
   height:41px;
   background-color:Chartreuse;
   margin-right:11px;
   padding-left:11px;
   padding-right:11px;
}

.test
 {
   float:right;
   margin-right:51px !important;
}

body {
   background:pink;
}
</style> 
 </head> 
 <body> 
  <ul id="subnav" class="right"> 
   <li> <a href="#">Lorem</a> </li> 
   <li> <a href="#">Lore</a> </li> 
   <li class="test"> <a href="#">Lore</a> </li> 
  </ul>  
 </body>
</html>

Related Tutorials