<!-- Learn about this code on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns -->

<div id="grid">
  <div id="areaA">A</div>
  <div id="areaB">B</div>
</div>
#grid {
  display: grid;
  width: 100%;
  grid-template-columns: 3fr 1fr;""
}

#areaA {
  background-color: lime;
}

#areaB {
  background-color: yellow;
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.