HTML CSS examples for CSS Widget:UL Alignment
vertically align to the lists
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> ul {<!-- ww w . j ava 2 s . com--> width:51%; display:table; } li { display:table-row; list-style:none; height:100px; } li>span { display:table-cell; vertical-align:middle; border:2px solid Chartreuse; } </style> </head> <body> <ul> <li> <span>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</span> </li> <li> <span>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</span> </li> <li> <span>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</span> </li> <li> <span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam</span> </li> </ul> </body> </html>