Using display:inline-flex in a child element - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Flex

Description

Using display:inline-flex in a child element

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">
.my-inline-element {<!--from ww w  .  j av  a2  s . c  o  m-->
   border:3px solid Chartreuse;
   display:inline;
   margin-right:6px;
}

.my-inline-element span {
   display:inline-flex;
}
</style> 
 </head> 
 <body> 
  <div class="my-inline-element"> 
   <span>Item1</span> 
  </div> 
  <div class="my-inline-element"> 
   <span>Item2</span> 
  </div> 
  <div class="my-inline-element"> 
   <span>Item3</span> 
  </div>  
 </body>
</html>

Related Tutorials