Coder Wrap provides free to use snippets Coder Wrap provides free to use snippets

Back to HTML
Preview Source Code
Download
HTML
CSS
/**Typeo CSS Start**/
  @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');
  * {
  box-sizing: border-box;
  }
  body {
  font-family: "Poppins", sans-serif;
  color: #444;
  box-sizing: border-box;
  margin: 0px;
  }

  .container {
  max-width: 1280px;
  width: 100%;
  padding: 0px 15px;
  margin: auto;
  }
  .container-fluid {
  width: 100%;
  padding: 0px 30px;
  }
  /**Typeo CSS End**/
  
  table {
  border: 1px solid #ccc;
  border-collapse: collapse;
  margin: 0;
  padding: 0;
  width: 100%;
  table-layout: fixed;
}

table tr {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  padding: .35em;
}
tbody tr:nth-child(2n+1) {
    background-color: #fff;
}
table th,
table td {
  padding: .625em;
  text-align: center;
}

table th {
  font-size: .85em;
  letter-spacing: .1em;
  text-transform: uppercase;
}

@media screen and (max-width: 700px) {
  table {
    border: 0;
  }

  table caption {
    font-size: 1.3em;
  }
  
  table thead {
    border: none;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }
  
  table tr {
    border-bottom: 3px solid #ddd;
    display: block;
    margin-bottom: .625em;
  }
  
  table td {
    border-bottom: 1px solid #ddd;
    display: block;
    font-size: .8em;
    text-align: right;
    position: relative;
    padding-left: 80px;
  }
  
  table td::before {
    content: attr(data-label);
    float: left;
    font-weight: bold;
    text-transform: uppercase;
    position: absolute;
    left: 8px;
    top: 7px;
  }
  
  table td:last-child {
    border-bottom: 0;
  }
}

Related Snippets

Leave a comment

Your email address will not be published. Required fields are marked *