HTML CSS examples for CSS Widget:UL Element
keep elements under a li element in the same line
<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>