Answers for "css grid auto fill height"

CSS
0

css grid column height fit content

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: minmax(min-content, max-content);
}
 /* ---OR--- */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-auto-rows: minmax(min-content, max-content);
}
Posted by: Guest on July-07-2021
0

css grid not taking full row height

.img_container{
    height: 50%; // or whatever value just make sure you give your parent a height
    width: 100%;
    background: url('link to your image') 50% no-repeat;
    background-size: cover;
 }
Posted by: Guest on July-28-2021

Browse Popular Code Answers by Language