keep elements under a li element in the same line - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

keep elements under a li element in the same line

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">
div {<!--  w w  w .j av a  2  s .c  om-->
   right:0px;
   width:201px;
   border:double;
   position:absolute;
}

span {
   display:inline-block;
   word-break:break-all;
}
</style> 
 </head> 
 <body> 
  <div> 
   <ul> 
    <li> <span>Lo</span> <span>Lorem ipsum dolor sit amet</span> </li> 
    <li> <span>Lo</span> <span>Lorem ipsum dolor sit amet, co</span> </li> 
   </ul> 
   <ul> 
    <li> <span>Lo</span> <span>Lorem ipsum dolor sit amet</span> </li> 
    <li> <span>Lo</span> <span>Lorem ipsum dolor sit amet, co</span> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials