HTML CSS examples for CSS Layout:Flex
Make Flexible box layout model to create horizontal UL
<html lang="en"> <head> <title>Flexbox demo using margin: auto</title> <style> ul {<!-- w w w .j a v a2 s.c o m--> display:-webkit-flex; display:flex; height:6em; background:yellow; } li { margin:auto; border:2px solid; } ul.column { -webkit-flex-direction:column; flex-direction:column; } </style> </head> <body translate="no"> <ul class="row"> <li>a</li> <li>b</li> <li>c</li> </ul> <ul class="column"> <li>a</li> <li>b</li> <li>c</li> </ul> </body> </html>