Align the list in the footer to the center - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Footer

Description

Align the list in the footer to the center

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">
footer {<!--   w  w  w. j a v a 2  s.c  o m-->
   background:Chartreuse;
   margin:0 auto;
   height:31px;
   padding-top:21px;
   width:100%;
   text-align:center;
   display:flex;
}

footer ul {
   margin:0 auto;
}

footer li {
   float:left;
   list-style-type:none;
   line-height:10px;
   height:12px;
   border-right:2px solid yellow;
   padding:0px 11px;
}

footer li a {
   text-decoration:none;
   color:blue;
   font-size:13px;
}
</style> 
 </head> 
 <body> 
  <footer> 
   <ul> 
    <li> <a href="#">2016 The Nielsen Company</a> </li> 
    <li> <a href="#">All Rights Reserved</a> </li> 
    <li> <a href="#">Privacy Policy</a> </li> 
    <li> <a href="#">Terms of Use</a> </li> 
   </ul> 
  </footer>  
 </body>
</html>

Related Tutorials