Two-column grid with two rows on the right column - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:2 Column

Description

Two-column grid with two rows on the right column

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">

.container {<!--from  ww  w.j a v a2 s.co m-->
   display: flex;
   background-color: #f5f5f5;
   border: 1px solid #ccc;
   width: 300px;
}
.box {
   background-color: lightgreen;
   border: 1px solid #ccc;
   text-align: center;
}
.inner-container {
   display: flex;
   flex-direction: column;
   justify-content: center;
}
.image {
   width: 100px;
   height: 100px;
}
.author_name,
.author_role {
   width: 200px;
   padding: 5px;
}


      </style> 
 </head> 
 <body> 
  <div class="container"> 
   <div class="box image">
     IMAGE 
   </div> 
   <div class="inner-container"> 
    <div class="box author_name">
      by Author Name 
    </div> 
    <div class="box author_role">
      Author Role 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials