Search
 
SCRIPT & CODE EXAMPLE
 

CSS

css grid two columns

div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 10px;
}
Comment

grid 4 columns 2 rows

.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;
}
Comment

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 */
}
Comment

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;
}
Comment

PREVIOUS NEXT
Code Example
Css :: css code to make text bold 
Css :: 100vh - 100px 
Css :: styling scrollbar css 
Css :: 1 line darkmode css 
Css :: html static background 
Css :: css no selection 
Css :: how to give shadow to navbar 
Css :: css gradient text 
Css :: transfrom rotate 
Css :: font awesome after css 
Css :: display none css inline 
Css :: how to cover entire div with background image 
Css :: tailwind nowrap 
Css :: css display none alternatives 
Css :: make text unhighlightable 
Css :: how to give opacity to background only 
Css :: drop shadow image css 
Css :: ion input change font size 
Css :: separar letras en css 
Css :: inline style background image 
Css :: cursor: not-allowed is not working with pointe events none in css 
Css :: antd css import 
Css :: css smooth text shadow 
Css :: opacity animation css 
Css :: line break doesnt work css 
Css :: how to make white image black in css 
Css :: css text bottom to top 
Css :: how to add box shadow to all sides css 
Css :: how to define max number of character for a paragraph css 
Css :: text align left in span 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =