Answers for "css grid with two columns"

CSS
2

css grid two columns

div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 10px;
}
Posted by: Guest on October-24-2021
0

have an item span multiple columns css grid

.item {
  grid-column: 2 / span 3;
  grid-row: 1 / span 2;
}
Posted by: Guest on September-16-2020
0

css grid take 2 columns

.wrapper {
  display: grid;
  grid-gap: 1rem;
  grid-template-columns: 1fr 1fr 1fr;
  grid-auto-flow: dense;
  padding: 1rem;
}

.box {
  background-color: red;
  color: #fff;
  border-radius: 0.5rem;
  padding: 1rem;
  font-size: 200%;
}

.a,
.d,
.e,
.f {
  background-color: green;
  grid-column: span 2;     /* <-- here is the trick */
}
Posted by: Guest on March-27-2022
0

css grid 1 row 2 columns

<div class="grid-container">
  <div class="grid-item">1</div>
  <div class="grid-item">2</div> 
</div>

.grid-container {
  display: grid;
  grid-template-columns: auto auto;
}
Posted by: Guest on March-25-2022

Browse Popular Code Answers by Language