Make <ul> list items fill div completely - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

Make <ul> list items fill div completely

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">
#currency {<!-- ww w  .j a v a 2 s. c  o  m-->
   width:501px;
   background-color:Chartreuse;
   float:right;
   margin-top:12px;
   margin-right:12px;
   line-height:12px;
   font-size:15px;
   text-align:justify;
   padding:11px;
   vertical-align:middle;
}

#currency ul {
   list-style-type:none;
   margin:0;
   padding:0;
   display:flex;
   justify-content:center;
   width:100%;
}

#currency ul li {
   flex-grow:3;
   text-align:center;
   margin:4px;
   background:yellow;
   height:21px;
   padding:6px;
}
</style> 
 </head> 
 <body> 
  <div id="currency"> 
   <ul> 
    <li>Lorem ipsu</li> 
    <li>Lorem i</li> 
    <li>Lorem ipsu</li> 
    <li>Lorem ip</li> 
    <li>Lorem ips</li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials