Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

Save Automatically?

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

              
                <link href="https://fonts.googleapis.com/css2?family=Rock+Salt&display=swap" rel="stylesheet">

<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">

<body>
  <div class="flex-container">
    <div class="order-details">
      <img class="mobile-logo" src="https://1000logos.net/wp-content/uploads/2018/03/Colors-Thrasher-Logo-500x281.jpg">
      <h2>Your Order Details</h2>
      
      <table class="item-table">
       <tr>
        <th="item-img"></th>
        <th="item-desc"></th>
        <th="price"></th>
       </tr>
       <tr>
        <td><img class="image" src="https://images.unsplash.com/photo-1527431016-15eb83515018?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80"></td>
        <td class="item-desc">Mens Funky Trainers Size 7</td>
        <td class="price">$49.99</td>
       </tr>
        <tr>
          <td><img class="image" src="https://images.unsplash.com/photo-1484186304838-0bf1a8cff81c?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80"></td>
          <td class="item-desc">Mens Ripped Jeans Size 28" x 32"</td>
          <td class="price">$29.99</td>
        </tr>
        <tr>
          <td><img class="image" src="https://images.unsplash.com/photo-1561626969-4caf99b7ef87?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80"></td>
          <td class="item-desc">Mens Oversized Hoodie Size M</td>
          <td class="price">$19.99</td>
        </tr>   
        <tr>
          <td><img class="image" src="https://images.unsplash.com/photo-1586934462216-a91ded6b7510?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80"></td>
          <td class="item-desc">Mens T-Shirt Size M</td>
          <td class="price">$9.99</td>
        </tr>   
        <tr>
          <td></td>
          <td></td>
          <td></td>
        </tr>
        <tr>
          <td id="total">Total</td>
          <td></td>
          <td class="price">$109.96</td>
        </tr>
        <tr>
          <td></td>
          <td><img class="logo" src="https://1000logos.net/wp-content/uploads/2018/03/Colors-Thrasher-Logo-500x281.jpg"</td>
          <td></td>
        </tr>      
      </table>
      
    </div>
    <div class="card-details">
      <h2>Your Card Details</h2>
      <form class="form">
        <label class="form-label" for="ccard">Accepted Cards</label>
     <div class="icon-container">
     <img class="ccard" src="https://image.flaticon.com/icons/svg/196/196561.svg">
     <img class="ccard" src="https://image.flaticon.com/icons/svg/196/196578.svg">
       <img class="ccard" src="https://image.flaticon.com/icons/svg/196/196539.svg"></div>
     <br><br>
        <label class="form-label" for="name">Name on Card</label><input class="input" type="text" id="name" placeholder="Mr S Skater"></input>
        <br><br>
      <label class="form-label" for="card-number">Card Number</label><input class="input" type="number" id="card-number" placeholder="1234 5678 8765 4321"></input>
    <br><br>
    <label class="form-label" for="expiry">Expiry Date</label><input class="date-input" type="month" id="expiry"></input>
<br><br>
    <label class="form-label" for="ccv">CCV</label><input class="ccv-input" type="number" id="ccv" placeholder="123"></input>
  <br><br>
<button class="button">Submit</button>
      </form>
    </div>
  </div>
</body>
              
            
!

CSS

              
                body {
  background-color: #CBF1FC;
  background-image: url('https://images.unsplash.com/photo-1592439203466-60bb966c2d1e?ixlib=rb-1.2.1&auto=format&fit=crop&w=750&q=80');
  background-repeat: no-repeat;
  background-size: initial;
  background-position: bottom right;
  height: 800px;
}

.flex-container {
  margin: auto;
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: no-wrap;
  align-items: center;
  justify-content: center;
  margin-top: 3%;
}

.order-details {
  width: 510px;
  height: 500px;
  border-radius: 10px;
  text-align: center;
  align-items: center;
  background: #FFDE00;
  border: solid 2px;
}

.card-details {
  width: 450px;
  height: 290px;
  border-radius: 10px;
  text-align: center;
  background: white;
  box-shadow: 2px 4px 15px 4px black;
  margin-left: -50px;
  border: solid 1px;
}

.item-table {
  width: 100%;
}

.item-img {
  width: 25%;
  text-align: center;
}

.image {
  width: 70px;
  height: 70px;
  object-fit: contain;
  box-shadow: 2px 2px #9e7400;
}

#total {
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  font-family: 'Rock Salt', cursive;
}

.logo {
  width: 150px;
  margin-top: -20px;
}

.mobile-logo {
  display: none;
  width: 150px;
  text-align: center;
}

.item-desc {
  width: 50%;
  text-align: left;
  font-family: 'Rock Salt', cursive;
  font-size: 12px;
  font-weight: 800;
}

.price {
  width: 25%;
  text-align: left;
  font-family: 'Roboto', sans-serif;
  font-weight: 800;
  font-size: 15px;
}

.order-details h2 {
  font-family: 'Rock Salt', cursive;
  font-weight: 800;
  font-size: 20px;
  line-height: 35px;
}

.card-details h2 {
  font-family: 'Roboto', sans-serif;
  font-size: 20px;
  line-height: 10px;
}

.ccard {
  width: 30px;
}

.form {
  font-family: 'Roboto', sans-serif;
  text-align: center;
  width: 100%;
  margin-left: 5px;
}

.form label {
  text-align: left;
  width: 150px;
  float: left;
}

.input {
  float: right;
  width: 260px;
  margin-right: 20px;
}

.date-input {
  float: right;
  width: 265px;
  margin-right: 20px;
}

.ccv-input {
  float: left;
  width: 100px; 
  margin-left: 10px;
}

.button {
  font-family: 'Rock Salt', cursive;
  font-weight: 800;
  font-size: 15px;
  width: 100px;
  height: 40px;
  background: yellow;
  border-radius: 10px;
  border: solid 1px;
}

.icon-container {
  float: left;
  width: 220px;
  margin-left: 10px;
  text-align: left;
}

@media (max-width: 960px) {
  .flex-container {
    flex-direction: column;
    align-items: center;
  }
  
  .price {
    text-align: right;
  }
  
  .order-details {
    width: 100%;
    height: 600px;
  }
  
  .card-details {
    width: 95%;
    height: 310px;
    display: inline-block;
    margin-right: 0px;
    margin-left: 2px;
    margin-top: -75px;
  }
  
  body {
    height: 1075px;
    background-size: contain;
  }
  
  .input {
    width: 180px;
  }
  
  .date-input {
    width: 181px;
  }
  
  .icon-container {
    width: 100px;
    margin-top: -3px;
    margin-left: 4px;
  }
  
  .mobile-logo {
    display: inline-block;
  }
  
  .logo {
    display: none;
  }
  
  .form-label {
    width: 105px;
    text-size: 8px;
  }
  
  .button {
    margin-top: 10px;
  }

}



              
            
!

JS

              
                
              
            
!
999px

Console