div {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 10px;
}
.container {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(2, auto);
gap: 1.75rem;
width: min(90%, 68.5rem);
margin-inline: auto;
}
.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 */
}
<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;
}
Code Example |
---|
Css :: line sharpness css |
Css :: multiple box shadows css |
Css :: is there any property that reset all atributes css div |
Css :: box style |
Css :: scss ::after |
Css :: terminal check time |
Css :: setting multiple css using dom |
Css :: css video background |
Css :: css nth-child |
Css :: fixed within the div css |
Css :: how to horizontally center header at the top of page with flexbox css |
Css :: font weight |
Css :: sass folder structure |
Css :: remove double quotes from string kotlin |
Css :: css animation shorthand |
Css :: flex grow |
Css :: inline pseudo element |
Css :: <link |
Css :: 1rem to px |
Css :: css create a circle image |
Css :: image orientation css |
Css :: remove auto focus selected background color |
Css :: overflow-y scroll css |
Css :: padding top bottom |
Css :: text-align css |
Css :: loading animation css |
Css :: how to style rule to apply the Border Box model css |
Css :: two line ellipsed |
Css :: input css for disabled state |
Css :: inherit css |