Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

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 */
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #css #grid #columns
ADD COMMENT
Topic
Name
1+3 =