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

CSS - display grid for columns

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

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

<style> 
  .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;
      }
  }
</style>

Please log in or register to response this reference.

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