Create flex item with the same height - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Flex Height

Description

Create flex item with the same height

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">
.parent {<!-- w ww  .  j  a  va2s .  com-->
   display:flex;
}

.child {
   border:2px solid Chartreuse;
   margin:6px;
}

.child:first-child {
   height:100px;
}
</style> 
 </head> 
 <body> 
  <div class="parent"> 
   <div class="child">
     Child 
   </div> 
   <div class="child">
     Child 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials