<div id="wrapper">
<div id="container">
<div id="info">
<img id="product" src="http://enwaara.se/codepen/product.png"/>
<p>Activity Bracelet Surge</p>
<p>Black</p>
<div id="price">
<h2>$ 2 700</h2>
</div>
</div>
<div id="payment">
<form id="checkout">
<input class="card" id="visa" type="button" name="card" value="">
<input class="card" id="mastercard" type="button" name="card" value="">
<label>Credit Card Number</label>
<input id="cardnumber" type=text pattern="[0-9]{13,16}" name="cardnumber" requierd="true" placeholder="0123-4567-8901-2345">
<label>Card Holder</label>
<input id="cardholder" type="text" name="name" requierd="true" maxlength="50" placeholder="Cardholder">
<label>Expiration Date</label>
<label id="cvc-label">CVC/CVV</label>
<div id="left">
<select name="month" id="month" onchange="" size="1">
<option value="00">MM</option>
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
<p>/</p>
<select name="year" id="year" onchange="" size="1">
<option value="00">YY</option>
<option value="01">16</option>
<option value="02">17</option>
<option value="03">18</option>
<option value="04">19</option>
<option value="05">20</option>
<option value="06">21</option>
<option value="07">22</option>
<option value="08">23</option>
<option value="09">24</option>
<option value="10">25</option>
</select>
</div>
<input id="cvc" type="text" placeholder="Cvc/Cvv" maxlength="3" />
<input class="btn" type="button" name="purchase" value="Purchase">
</form>
</div>
</div>
</div>
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
border-radius: $radius;
}
$primary-color: #6C7A89;
$secondary-color: #00b894;
$decor-color: #BDC3C7;
$font: "proxima-nova", sans-serif;
*{
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-transition: 0.2s ease-in-out;
-moz-transition: 0.2s ease-in-out;
-o-transition: 0.2s ease-in-out;
transition: 0.2s ease-in-out;
font-family: $font;
font-weight: 400;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: $primary-color;
&:focus{
outline: none;
}
}
body{
background-color: #e2fbf5;
}
#wrapper{
position: absolute;
top: 50%;
margin-top: -240px;
left: 0;
width: 100%;
}
#container{
width: 720px;
height: 480px;
margin: 0 auto;
box-shadow: 1px 1px 10px 2px rgba(0,0,0,0.2);
@include border-radius(5px);
overflow: hidden;
background: rgb(179,190,173);
background: -moz-linear-gradient(45deg, rgba(179,190,173,1) 0%, rgba(223,229,215,1) 60%, rgba(252,255,244,1) 100%);
background: -webkit-linear-gradient(45deg, rgba(179,190,173,1) 0%,rgba(223,229,215,1) 60%,rgba(252,255,244,1) 100%);
background: linear-gradient(45deg, rgba(179,190,173,1) 0%,rgba(223,229,215,1) 60%,rgba(252,255,244,1) 100%);
}
#info{
width: 52%;
height: 480px;
float: left;
background: -moz-linear-gradient(45deg, rgba(149,165,166,1) 0%, rgba(208,215,216,0) 56%, rgba(255,255,255,0) 100%);
background: -webkit-linear-gradient(45deg, rgba(149,165,166,1) 0%,rgba(208,215,216,0) 56%,rgba(255,255,255,0) 100%);
background: linear-gradient(45deg, rgba(149,165,166,1) 0%,rgba(208,215,216,0) 56%,rgba(255,255,255,0) 100%);
#product{
width: 500px;
margin: -50px 0 -85px -65px;
}
p{
width: 100%;
text-align: center;
line-height: 1.5em;
letter-spacing: 1px;
}
#price{
width: 50%;
margin: 0 auto;
letter-spacing: 1px;
h2{
width: 100%;
text-align: center;
font-weight: 700;
color: #000;
padding-top: 10px;
}
}
}
#payment{
width: 40%;
float: right;
padding: 95px 50px 25px 0;
}
#checkout{
width: 100%;
input{
margin-bottom: 15px;
}
label{
float: left;
text-transform: uppercase;
letter-spacing: 1.5px;
font-size: 0.6em;
padding: 0 0 5px 10px;
}
#cvc-label{
margin-left: 25px;
}
.card{
width: 29%;
margin: 0 10% 25px 10%;
border: none;
background: none;
height: 50px;
cursor: pointer;
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
&:focus{
-webkit-filter: none;
filter: none;
}
}
#visa{
background-image: url("http://enwaara.se/codepen/visa.png");
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
}
#mastercard{
background-image: url("http://enwaara.se/codepen/mastercard.png");
background-repeat: no-repeat;
background-position: center center;
background-size: 118%;
}
#cardnumber, #cardholder, #cvc{
width: 100%;
background: none;
border: 1px solid $primary-color;
padding: 8px 19px;
@include border-radius(50px);
letter-spacing: 1px;
&:focus {
border: 1px solid $secondary-color;
}
}
::-webkit-input-placeholder {
letter-spacing: 3px;
text-transform: uppercase;
font-size: 0.9em;
color: $decor-color;
}
#cardnumber{
letter-spacing: 3px;
&::-webkit-input-placeholder {
font-size: 1em;
}
}
#left{
width: 41%;
border: 1px solid $primary-color;
@include border-radius(50px);
overflow: hidden;
padding: 3px 5px;
float: left;
#month, #year{
background: none;
border: none;
padding: 5px;
@include border-radius(5px);
float: left;
font-size: 0.8em;
letter-spacing: 3px;
color: $decor-color;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
option{
background: #ECECEC;
}
}
p{
float: left;
padding-top: 2px;
font-size: 1.2em;
color: $decor-color;
letter-spacing: 3px;
}
}
#cvc{
width: 48%;
float: left;
margin-left: 11%;
}
.btn{
background: $secondary-color;
border: none;
width: 100%;
padding: 12px 10px 10px 10px;
@include border-radius(50px);
text-transform: uppercase;
letter-spacing: 2px;
font-weight: 400;
color: #ECECEC;
cursor: pointer;
&:hover{
background: #16A085;
}
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.