CSS - centralise 3 column items

0 votes
160 views
added Feb 14, 2022 in CSS by lcjr First Warrant Officer (11,990 points)
.mrec-container { 
  align-items: center;
  justify-content: center;
  align-content: center;
  width: 100%;
  margin-top: 20px;
  display: grid;
  grid-template-columns: auto auto auto;
  padding: 10px;
  @media (max-width: 768px) { 
    display: block;
    padding: 0;
  }
  .mrec-items { 
    padding: 20px; 
    text-align: center; 
    @media (max-width: 768px) { 
      padding: 0 0 30px; 
    } 
    div > div {
      margin: auto;
    }
  }
}

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...