Solution 1 :

If you would like to create such layout, you can let the main container having the grid layout when leaving the others as it is. Here’s a simple sample snippet you may try.

div {
  border: 1px solid #000;
}

.top-row, .bottom-row {
  width: 100%;
}

.main-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  width: 100%;
}
<div class="top-row">Top</div>
<div class="main-row">
  <div class="left">left</div>
  <div class="right">right</div>
</div>
<div class="bottom-row">Bottom</div>

The above snippet applied the grid-template-columns to divide the .main-row so the left column will have one-third (1/3) width of the screen and the right column will occupy the rest (2/3). It uses fr as the fraction measurement. You can also do the experiment with auto for this.

Solution 2 :

Maybe this can help

<style>
.angry-grid {
   display: grid; 

   grid-template-rows: 1fr 1fr 1fr 1fr;
   grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
   
   gap: 0px;
   height: 100%;
   
}
  
#item-0 {

   background-color: #e6b8d5; 
   grid-row-start: 1;
   grid-column-start: 1;

   grid-row-end: 2;
   grid-column-end: 6;
   
}
#item-1 {

   background-color: #b989ce; 
   grid-row-start: 2;
   grid-column-start: 1;

   grid-row-end: 4;
   grid-column-end: 3;
   
}
#item-2 {

   background-color: #77b957; 
   grid-row-start: 2;
   grid-column-start: 3;

   grid-row-end: 4;
   grid-column-end: 6;
   
}
#item-3 {

   background-color: #ba997d; 
   grid-row-start: 4;
   grid-column-start: 1;

   grid-row-end: 5;
   grid-column-end: 6;
   
}
</style>

<div class="angry-grid">
  <div id="item-0">TOP_ROW</div>
  <div id="item-1">LEFT</div>
  <div id="item-2">RIGHT</div>
  <div id="item-3">BOT</div>
</div>

Problem :

enter image description here

I’ve been trying to practice HTML and I was wondering how could I design the layout to be like the one on the image.

  • Top row is where my navigation would be.
  • Main row left is to be left empty or populated by other links
  • Main row right is where the main content would show up
  • Bottom row is my footer.

Comments

Comment posted by here

Have a look

By