Centering ul with rows - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL

Description

Centering ul with rows

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">
li {<!-- w  ww  .  j av a  2 s  .  co  m-->
   list-style:none;
   text-align:center;
}

h1 {
   text-align:center;
}

ul {
   margin:0;
   padding:0;
}

button {
   display:block;
   margin-right:auto;
   margin-left:auto;
}
</style> 
 </head> 
 <body> 
  <h1>Lorem ipsum dolor sit</h1> 
  <button>Lorem ipsum dolor sit </button> 
  <ul class="tl"> 
   <li>Lorem ipsu</li> 
   <li>Lorem ipsu</li> 
   <li>Lorem ipsu</li> 
   <li>Lorem ipsu</li> 
   <li>Lorem ipsu</li> 
   <li>Lorem ipsu</li> 
   <li>Lorem ipsu</li> 
   <li>Lorem ipsu</li> 
   <li>Lorem ipsu</li> 
   <li>Lorem ipsum</li> 
   <li>Lorem ipsum</li> 
   <li>Lorem ipsum</li> 
   <li>Lorem ipsum</li> 
   <li>Lorem ipsum</li> 
   <li>Lorem ipsum</li> 
  </ul>  
 </body>
</html>

Related Tutorials