Style ul with width to accommodate items - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

Style ul with width to accommodate items

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
 </head> <!--from   w  w w .j av a2 s  . c  om-->
 <body> 
  <ul style="z-index: 1;  border: thin solid red; width: auto; display:inline-block"> 
   <li> <a> 
     <div style="font-size: 0.85em;"> 
      <span style="float: right; padding-left: 10px; color: gray;">Lorem ipsum dolo</span> 
      <span style="">Lorem ipsum dolor sit am</span> 
     </div> </a> </li> 
  </ul>  
 </body>
</html>

Related Tutorials