Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <main class="main">
  <header class="header">
    <div class="menu">
      <svg xmlns="http://www.w3.org/2000/svg" x="0" y="0" enable-background="new 0 0 64 64" version="1.1" viewBox="0 0 64 64" xml:space="preserve">
        <path d="M61.3 29.3H2.7C1.1 29.3 0 30.4 0 32c0 1.6 1.1 2.7 2.7 2.7h58.7c1.6 0 2.7-1.1 2.7-2.7C64 30.4 62.9 29.3 61.3 29.3zM61.3 48H2.7C1.1 48 0 49.1 0 50.7c0 1.6 1.1 2.7 2.7 2.7h58.7c1.6 0 2.7-1.1 2.7-2.7C64 49.1 62.9 48 61.3 48zM2.7 16h58.7c1.6 0 2.7-1.1 2.7-2.7s-1.1-2.7-2.7-2.7H2.7c-1.6 0-2.7 1.1-2.7 2.7S1.1 16 2.7 16z" />
      </svg>
    </div>
    <nav class="nav">
      <span class="page-title text-lg">Transactions</span>
    </nav>
  </header>
  <section class="data-summary">
    <div class="data-info bg-yellow">
      <h6 class="data-info__heading">spent</h6>
      <div class="data-info__content">
        <sup class="sup">$</sup><span class="data-info__amount text-lg">1,253</span>
      </div>
    </div>
    <div class="data-info bg-blue">
      <h6 class="data-info__heading">left</h6>
      <div class="data-info__content">
        <sup class="sup">$</sup><span class="data-info__amount text-lg">1,747</span>
      </div>
    </div>
    <div class="data-info data-info--light">
      <h6 class="data-info__heading">next payment</h6>
      <div class="data-info__content">
        <sup class="sup">$</sup><span class="data-info__amount text-lg">235</span>
      </div>
      <div class="data-info__tag">Want to pay less?</div>
    </div>
    <div class="data-info data-info--light">
      <h6 class="data-info__heading">next payment due</h6>
      <div class="data-info__content">
        <span class="data-info__amount text-lg">12 May</span>
      </div>
      <div class="data-info__tag">Autopay Scheduled</div>
    </div>
    <button class="btn btn-primary">Make Payment Now</button>
  </section>
  <section class="data-body">
    <div class="scroll-check">
      <table id="data-table">
        <thead>
          <tr class="table__row--header">
            <th><span class="header__title">ID</span></th>
            <th><span class="header__title">Merchant</span></th>
            <th><span class="header__title">Charge</span></th>
            <th><span class="header__title">Date</span></th>
            <th><span class="header__title">Cost</span></th>
          </tr>
        </thead>

        <tbody class="table__body">
          <tr class="table__row">
            <td><span class="id">ZZ01</span></td>
            <td><span class="merchant">The standard miami</span></td>
            <td><span class="charge">purchase</span></td>
            <td><span class="date">April 18</span></td>
            <td><span class="price">$648</span></td>
          </tr>
          <tr class="table__row">
            <td><span class="id">ZZ02</span></td>
            <td><span class="merchant">Delta Airlines</span></td>
            <td><span class="charge">pending</span></td>
            <td><span class="date">April 23</span></td>
            <td><span class="price">$465</span></td>
          </tr>
          <tr class="table__row">
            <td><span class="id">ZZ03</span></td>
            <td><span class="merchant">Netflix</span></td>
            <td><span class="charge">subscription</span></td>
            <td><span class="date">April 29</span></td>
            <td><span class="price">$9</span></td>
          </tr>
          <tr class="table__row">
            <td><span class="id">ZZ04</span></td>
            <td><span class="merchant">Pringles</span></td>
            <td><span class="charge">purchase</span></td>
            <td><span class="date">April 29</span></td>
            <td><span class="price">$756</span></td>
          </tr>
          <tr class="table__row">
            <td><span class="id">ZZ05</span></td>
            <td><span class="merchant">Right Gas Fuel</span></td>
            <td><span class="charge">purchase</span></td>
            <td><span class="date">April 29</span></td>
            <td><span class="price">$100</span></td>
          </tr>
          <tr class="table__row">
            <td><span class="id">ZZ06</span></td>
            <td><span class="merchant">LoL 2020 Worlds Ticket</span></td>
            <td><span class="charge">purchase</span></td>
            <td><span class="date">April 30</span></td>
            <td><span class="price">$1,349</span></td>
          </tr>
          <tr class="table__row">
            <td><span class="id">ZZ07</span></td>
            <td><span class="merchant">Netflix</span></td>
            <td><span class="charge">subscription</span></td>
            <td><span class="date">April 32</span></td>
            <td><span class="price">$90</span></td>
          </tr>
          <tr class="table__row">
            <td><span class="id">ZZ08</span></td>
            <td><span class="merchant">Delta Airlines</span></td>
            <td><span class="charge">subscription</span></td>
            <td><span class="date">April 33</span></td>
            <td><span class="price">$34</span></td>
          </tr>
          <tr class="table__row">
            <td><span class="id">ZZ09</span></td>
            <td><span class="merchant">COS Online</span></td>
            <td><span class="charge">purchase</span></td>
            <td><span class="date">April 34</span></td>
            <td><span class="price">$12</span></td>
          </tr>
        </tbody>
      </table>
    </div>
  </section>
</main>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

$clr-light: #ffffff;
$clr-dark: #0f0f0f;
$clr-grey: #fdfdfd;
$clr-yellow: #fff691;
$clr-green: #6dea9e;
$clr-blue: #aff5f7;
$body-bg-color: #f7f7f7;
$clr-txt-grey: rgb(138, 138, 138);
$clr-txt-black: #2e2e2e;
$header-height: 95px;
$font-family: "Poppins", sans-serif;
$common-border: 1px solid rgba(0, 0, 0, 0.1);
$fs-1: 1.802rem;
$fs-2: 1.602rem;
$fs-3: 1.424rem;
$fs-4: 1.266rem;
$fs-5: 1.125rem;
$fs-6: 1rem;
$fs-7: 0.85rem;
$fs-8: 0.67rem;

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  outline: none;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: $font-family;
  background-color: $body-bg-color;
  color: $clr-txt-black;
  width: 100%;
  height: auto;
  min-height: 800px;
  line-height: 1.6;
  vertical-align: baseline;
}

img {
  max-width: 100%;
}

button {
  border: 0;
  outline: 0;
  font-family: $font-family;
  cursor: pointer;
  background: transparent;
}

th {
  text-align: left;
  font-weight: 500;
  border: none;
}

th span,
td span {
  display: block;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

::-webkit-scrollbar {
  display: none;
}

.bg-green {
  background-color: $clr-green;
}

.bg-blue {
  background-color: $clr-blue;
}

.bg-yellow {
  background-color: $clr-yellow;
}

.text-lg {
  font-size: $fs-1;
  @media screen and (max-width: 860px) {
    font-size: $fs-2;
  }
}

.btn {
  @media screen and (max-width: 860px) {
    font-size: $fs-7;
  }
  font-weight: 700;
  font-size: $fs-6;
  text-transform: capitalize;
  transition: 0.5ms ease;
}

.btn-primary {
  color: $clr-dark;
  @extend .bg-green;
  &:hover,
  &:active {
    background-color: #6dea9fda;
  }
}

.main {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr minmax(150px, 25%);
  grid-template-rows: $header-height auto;
  border-block-start: 7px solid $clr-dark;
  @media screen and (max-width: 860px) {
    grid-template-columns: 100%;
  }
}

.header {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(65px, 10%) 1fr;
  grid-template-rows: inherit;
  grid-column-start: 1;
  grid-column-end: 2;
}
.menu {
  border-right: $common-border;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  svg {
    width: 32px;
    height: 32px;
    @media screen and (max-width: 860px) {
      width: 26px;
      height: 26px;
    }
  }
}
.nav {
  line-height: $header-height;
  .page-title {
    padding-left: 2.6rem;
    @media screen and (max-width: 860px) {
      padding-left: 1.8rem;
    }
  }
}

.data-summary {
  display: grid;
  height: 100vh;
  grid-column: 2;
  grid-row: 1;
  grid-template-rows: repeat(2, $header-height) repeat(2, 1fr) 60px;
  grid-template-columns: 100%;
  border-left: 0.86px solid rgba(0, 0, 0, 0.1);
  @media screen and (max-width: 860px) {
    height: auto;
    grid-column: auto;
    grid-row: auto;
    grid-template-rows: repeat(2, calc($header-height + 10vh)) repeat(2, 1fr) 70px;
  }
}

.data-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;

  &__heading {
    font-size: $fs-8;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  &__content {
    font-weight: 400;
    .sup {
      font-weight: 500;
      font-size: $fs-5;
      margin-inline-end: 0.29rem;
    }
  }
  &__amount {
    letter-spacing: 2px;
  }
  &__tag {
    min-width: 120px;
    min-height: 25px;
    line-height: 25px;
    border-radius: 25px;
    text-align: center;
    font-weight: 300;
    font-size: $fs-8;
    background-color: $clr-grey;
  }
}

.data-info:nth-child(4) {
  border-bottom: none;
}

.data-info--light {
  background-color: $clr-light;
  border-bottom: $common-border;
  min-height: 200px;
  .data-info__content {
    margin: 1rem 0;
  }
}

.data-body {
  width: 100%;
}

.scroll-check {
  width: 100%;
  height: 500px;
  overflow-y: scroll;
  @media screen and (max-width: 700px) {
    overflow-x: scroll;
  }
}

#data-table {
  width: 100%;
  min-width: 600px;
  .table__row--header {
    background-color: $clr-dark;
    color: $clr-light;
    th:first-child {
      text-align: center;
    }
    .header__title {
      display: block;
      padding: 1rem 0;
      text-transform: capitalize;
      font-weight: 400;
    }
  }

  .table__row {
    height: 4rem;
    &:nth-child(odd) {
      background-color: $clr-grey;
    }
    .id {
      text-align: center;
    }
    .price,
    .merchant {
      font-weight: 400;
      font-size: $fs-6;
    }
    .date,
    .charge {
      text-transform: capitalize;
      font-size: $fs-7;
      color: $clr-txt-grey;
    }
  }
  @media screen and (max-width: 860px) {
    col:nth-child(1) {
      display: none;
    }
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console