Create UL based menu using Flex container - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Flex

Description

Create UL based menu using Flex container

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">
ul {<!--from w w  w  . ja v a  2 s. c  om-->
   display:flex;
   flex-wrap:wrap;
}

li {
   list-style:none;
   flex-direction:column;
   display:flex;
   border:3px solid Chartreuse;
   background-color:yellow;
   height:41px;
   padding:0;
   margin:0 11px;
}

a {
   display:inline-block;
   width:61px;
}
</style> 
 </head> 
 <body> 
  <ul> 
   <li> <a href="#">item1</a> </li> 
   <li> <a href="#">item1</a> </li> 
   <li> <a href="#">item1</a> </li> 
   <li> <a href="#">item1</a> </li> 
  </ul>  
 </body>
</html>

Related Tutorials