Answers for "css grid"

1

css grid

.wrapper {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  grid-auto-rows: 100px;
  grid-template-areas:
    "a a a a b b b b"
    "a a a a b b b b"
    "c c c c d d d d"
    "c c c c d d d d";
  align-items: start;
}
.item1 {
  grid-area: a;
}
.item2 {
  grid-area: b;
}
.item3 {
  grid-area: c;
}
.item4 {
  grid-area: d;
}
Copy to Clipboard
<div class="wrapper">
  <div class="item1">Item 1</div>
  <div class="item2">Item 2</div>
  <div class="item3">Item 3</div>
  <div class="item4">Item 4</div>
</div>
Copy to Clipboard
Posted by: Guest on August-11-2021
2

css grid

.container {
  grid-template-columns: 1fx 1fr 1fr;
  grid-template-rows: 80px auto 80px; 
  column-gap: 10px;
  row-gap: 15px;
}
Posted by: Guest on July-12-2021
10

css grid

.item-a {
  grid-area: header;
}
.item-b {
  grid-area: main;
}
.item-c {
  grid-area: sidebar;
}
.item-d {
  grid-area: footer;
}

.container {
  display: grid;
  grid-template-columns: 50px 50px 50px 50px;
  grid-template-rows: auto;
  grid-template-areas: 
    "header header header header"
    "main main . sidebar"
    "footer footer footer footer";
}
Posted by: Guest on April-12-2020
0

css grid

<div class="grid-container">
  <div class="grid-item">1</div>
  <div class="grid-item">2</div>
  <div class="grid-item">3</div>  
  <div class="grid-item">4</div>
  <div class="grid-item">5</div>
  <div class="grid-item">6</div>  
  <div class="grid-item">7</div>
  <div class="grid-item">8</div>
  <div class="grid-item">9</div>  
</div>

.grid-container {
  width: 300px;
  height: 300px;
  display: grid;
  grid-template-columns: auto auto auto;
  place-items: center;
}

.grid-item {
  background-color: silver;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}
Posted by: Guest on October-03-2021
0

css grid

grid: none|grid-template-rows / 
  grid-template-columns|grid-template-areas|grid-template-rows 
  / [grid-auto-flow] grid-auto-columns|[grid-auto-flow] grid-auto-rows / grid-template-columns|initial|inherit;
Posted by: Guest on July-13-2021
0

css grid

.grid-container {
  display: grid;
  display: inline-grid;
  display: subgrid;
Posted by: Guest on October-15-2021

Browse Popular Code Answers by Language