Align text to the right inside header - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Header

Description

Align text to the right inside header

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">

.header {<!--from w w  w.  j  a v a  2 s  . co  m-->
   background-color: red;
   height: 50px;
   width: 100%;
}
.header ul {
   text-align: right;
   list-style: none;
}
.header li {
   display: inline-block;
}
.header li a {
   text-decoration: none;
   color: #fff;
}


      </style> 
 </head> 
 <body> 
  <div class="header"> 
   <ul> 
    <li> <a href="#">Home</a> </li> 
    <li> <a href="#">About Us</a> </li> 
    <li> <a href="#">Team</a> </li> 
    <li> <a href="#">News</a> </li> 
    <li> <a href="#">Contact Us</a> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials