HTML CSS examples for CSS Widget:UL Horizontal
Make li elements stack horizontally
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .comments {<!--from ww w . j av a 2 s . com--> overflow:hidden; width:356px; height:91px; margin:16px 0px 16px 16px; padding:11px; border:2px dashed Chartreuse; background-color:yellow; white-space:nowrap; } .comments li { vertical-align:top; display:inline-block; width:341px; height:61px; white-space:normal; } .comments .title { font-size:100%; color:blue; } .comments .p { float:left; padding-left:6px; } </style> </head> <body> <ul class="comments"> <li> <span class="title">Lorem ipsum do<b>Lorem ips</b> </span> <p>Lorem ipsum dolor s</p> <p>Lorem ipsum dolor sit amet, consecte</p> </li> <li> <span class="title">Lorem ipsum do<b>Lorem ips</b> </span> <p>Lorem ipsum dolor s</p> <p>Lorem ipsum dolor sit amet, consecte</p> </li> <li> <span class="title">Lorem ipsum do<b>Lorem ips</b> </span> <p>Lorem ipsum dolor s</p> <p>Lorem ipsum dolor sit amet, consecte</p> </li> </ul> </body> </html>