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 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

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

              
                <div class="checkout">
  <div class="checkout_wrap">
    <div class="row">

      <div class="col-xs-4">
        <!--PRODUCT-->
        <div class="product_wrap">
          <div class="product_main">
            <img src="https://cdn.shopify.com/s/files/1/1383/5663/products/nUfktRxAtd3kdSy26835S772JrFPTf-right_large.png?v=1480349616">
          </div>
          <h1 class="product_title">Mug Life</h1>
          <small class="product_desc">Designer mug with metalic finish</small>
          <h3 class="product_price">$14.99</h3>
        </div>
      </div>

      <div class="col-xs-8">
        <!--CHECKOUT-->
        <div class="product_arrow">
          <div class="triangle-left"></div>
        </div>
        <div class="checkout_details">
          <div class="col-xs-12">
            <h1 class="checkout_title">Credit Card Detail</h1>
            <form class="checkout_form">
              <input type="name" placeholder="Customer Full Name">
              <input class="cc-number" type="text" placeholder="Card Number" maxlength="20">
              <div class="row">
                <div class="col-xs-6">
                  <input class="cc-exp" type="name" placeholder="Card Expiry">
                </div>
                <div class="col-xs-6">
                  <input class="cc-cvc" type="name" placeholder="CVV">
                </div>
              </div>
              <button class="checkout_pay" type "button" value="submit">Pay &raquo;</button>
            </form>
          </div>
        </div>
      </div>

    </div>
  </div>
</div>
              
            
!

CSS

              
                * {
  font-family: 'Poppins', sans-serif;
}

body{
  margin: 0px;
  padding: 0px;
  background-color: #D4E157;
}

hr{  
  border: 0; 
  height: 1px; 
  background-image: -webkit-linear-gradient(left, #464748, #8c8b8b, #464748);
  background-image: -moz-linear-gradient(left, #464748, #8c8b8b, #464748);
  background-image: -ms-linear-gradient(left, #464748, #8c8b8b, #464748);
  background-image: -o-linear-gradient(left, #464748, #8c8b8b, #464748); 
}

/* Product page
----------------------------*/
.product_wrap{
  width: 100%;
  position: relative;
  overflow: hidden;
  padding-left: 8px;
}

.product_arrow{
  position: absolute;
  left:157px;
  bottom:37px;
}

.triangle-left {
	width: 0;
	height: 0;
	border-top: 10px solid transparent;
	border-right: 15px solid #464748;
	border-bottom: 10px solid transparent;
}

.product_main{
  position: relative;
  width: 100%;
}
.product_main img{
  width: 100%;
}

.product_title{
  padding-bottom: 10px;
  margin:0px;
  font-size: 1.1em;
  font-weight: 400;
  color: #464748;
}
.product_desc{
  margin: 0px;
  color: #717375;
  font-size: 12px;
}

.product_price{;
  color: #464748;  
}


/* Checkout section
----------------------------*/
.checkout {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.checkout_wrap {
  width: 500px;
  height: 300px;
  background-color: #F7E4AA;
  border-radius: 5px;
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  oveflow: hidden;
}

.checkout_details {
  height: auto;
  padding: 10px;
  border-radius: 0px 5px 5px 0px;
  background-color: #464748;
  position: absolute;
  height: 100%;
  box-sizing: border-box;
}

.checkout_title {
  margin: 0px;
  padding: 10px 0px;
  font-size: 1.1em;
  font-weight: 400;
  color: #fff;
}

.checkout_form {
  width: 100%;
  position: relative;
  overflow: hidden;
  padding: 10px 0px;
}

.checkout_form input {
  width: 100%;
  height: auto;
  padding: 8px 10px;
  margin: 8px 0px;
  font-size: 14px;
  border: none;
  border-bottom: 1px solid #717375;
  background-color: transparent;
  color: #F7E4AA;
  box-sizing: border-box;
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.020);
  font-family: 'Poppins', sans-serif;
}
.checkout_form input:focus {
    outline-width: 0;
}

::-webkit-input-placeholder {
  /* Chrome/Opera/Safari */
  color: #9e9e9e;
}

::-moz-placeholder {
  /* Firefox 19+ */
  color: #717375;
}

:-ms-input-placeholder {
  /* IE 10+ */
  color: #717375;
}

:-moz-placeholder {
  /* Firefox 18- */
  color: #717375;
}

.checkout_pay {
  width: 100%;
  height: auto;
  padding: 8px 10px;
  margin: 8px 0px;
  border: none;
  background-color: #F7E4AA;
  color: #2a2a2a;
  border-radius: 3px;
  font-weight: 400;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.2);
}
              
            
!

JS

              
                $('.cc-number').payment('formatCardNumber');
$('.cc-exp').payment('formatCardExpiry');
$('.cc-cvc').payment('formatCardCVC');
$('.checkout_pay').hide();

$(document).on('keyup', '.cc-number, .cc-cvc, .cc-exp', function (){
	var cname = $('.cc-number').val();
	var ccvc = $('.cc-cvc').val();
	var cexp = $('.cc-exp').val();

	if( cname != "" && ccvc != "" && cexp !="" ){
		$('.checkout_pay').fadeIn(300);
	}

});
              
            
!
999px

Console