Are you first timer at Why not join us and start exchange your programming knowledge with everyone. Register today!

CSS - display grid for columns

0 votes
added Jul 22 in CSS by lcjr Second Warrant Officer (6,120 points)

<div class="listInfo">
  <span>column 1 </span>
  <span>column 2</span>

  .listInfo {
      display: grid;
      grid-template: auto / 1fr 1fr;
      row-gap: 8px;
      -webkit-column-gap: 8px;
      column-gap: 8px;
      -webkit-align-items: center;
      -webkit-box-align: center;
      -ms-flex-align: center;
      align-items: center;
      span {
        display: inline-block;
        font-size: 12px;
        padding-left: 30px;
        background-image: url(/images/current-listings/column-icon.png);
        background-size: 16px;
        background-position: center left;
        background-repeat: no-repeat;

Please log in or register to response this reference. - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.