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

              
                <div class="wrapper">
        <form class="usr_frm" action="">
            <h3>Your details</h3>
            <fieldset>
                          <div class="w50p fleft parnt">
                              <input class="adiptxt check" id="p_name" type="text" autocomplete="off" value="" required><label for="p_name" class="lb_fld">First name*</label>
                          </div>
                          <div class="w50p fleft parnt">
                              <input class="adiptxt check" id="p_surname" type="text"  autocomplete="off" value=""><label for="p_surname" class="lb_fld" required>Last name*</label>

                          </div>
                      </fieldset>
            <fieldset>
                          <div class="parnt">
                         <input class="adiptxt check" id="p_email" type="email" autocomplete="off" value="" required>
                         <label for="p_email" class="lb_fld">Email address*</label>
                          </div>

                      </fieldset>  
                      
                    <fieldset class="dob_fld">
                        <label><strong>Date Of Birth*</strong></label>
                              <div class="dob_div clr">
                              <div class="parnt">
                                  <input class="adiptxt" type="number" maxlength="2" autocomplete="off" id="p_date" placeholder="dd" value="" required>
                                  <label for="p_date" class="top_lb">Day</label>
                              </div>
                              <div class="parnt">
                                  <input class="adiptxt" type="text" maxlength="2" autocomplete="off" id="p_month" placeholder="mm" value="" required>
                                  <label for="p_month" class="top_lb">Month</label>
                              </div>
                              <div class="parnt">
                                  <input class="adiptxt" type="text" maxlength="4" autocomplete="off" id="p_year" placeholder="yyyy" value="" required>
                                  <label for="p_year" class="top_lb">Year</label>
                              </div>
                          </div>
                      </fieldset> 
            <button class="send" type="submit">SEND</button>                 
        </form>
    </div>
              
            
!

CSS

              
                 * {
   padding: 0;
   margin: 0;
   box-sizing: border-box;
   border: 0;
 }
 
 .wrapper {
   width: 100%;
   max-width: 500px;
   margin: 0 auto;
 }
 
 .usr_frm {
   padding: 20px;
   width: 100%;
   font-family: sans-serif;
 }
 
 .usr_frm .adiptxt {
   background: #edf0ef;
   color: #6e827b;
   border: 1px solid #edf0ef;
   padding: 26px 18px 13px;
   width: 100%;
   outline: none;
   font: 16px arial;
   border-radius: 0;
   box-shadow: none;
 }
 
 .w50p {
   width: 49%;
 }
 
 .usr_frm h3 {
   margin: 0 0 10px;
 }
 
 .usr_frm fieldset {
   margin: 0 0 10px;
 }
 
 .fleft {
   float: left;
 }
 
 .w50p:not(:last-child) {
   margin-right: 2%;
 }
 
 .parnt {
   position: relative;
 }
 
 .lb_fld,
 .dob_div .parnt label {
   font-size: 16px;
   position: absolute;
   left: 20px;
   top: 21px;
   z-index: 99;
   transition: all .2s;
   -webkit-transition: all .2s;
   color: #b4beba;
 }
 
 .adiptxt:focus + label,
 .parnt label.top_lb {
   font-size: 12px;
   top: 12px;
   color: #6e827b;
 }
 
 .adiptxt:focus {
   border-color: #adb9b5;
   background: #f6f7f7;
 }
 
 .dob_div .parnt {
   width: 32%;
   float: left;
 }
 
 .dob_div .parnt label {
   top: 12px;
   font: 12px arial;
   color: #6e827b;
 }
 
 .dob_div .adiptxt:focus + label {
   font-size: 14px;
   top: 9px;
 }
 
 .dob_div .parnt:not(:last-child) {
   margin-right: 2%;
 }
 
 .dob_div,
 fieldset.dob_fld {
   margin: 10px 0 0;
 }
 
 input[type=number]::-webkit-inner-spin-button,
 input[type=number]::-webkit-outer-spin-button {
   -webkit-appearance: none;
   appearance: none;
   margin: 0;
 }
 
 input[type=number] {
   -moz-appearance: textfield;
 }
 
 input::-webkit-input-placeholder {
   color: #b4beba;
 }
 
 input::-moz-input-placeholder {
   color: #b4beba;
 }
 
 input:-ms-input-placeholder {
   color: #b4beba;
 }
 
 .send {
   padding: 10px;
   min-width: 100px;
   color: #fff;
   font-weight: bold;
   font-size: 14px;
   display: block;
   margin: 20px auto 10px;
   border-radius: 5px;
   outline: none;
   border: 1px solid transparent;
   text-align: center;
   background: #66cc33;
   transition: all 0.2s;
 }
 
 .send:hover,
 .send:focus {
   border: 1px solid #818a81;
 }
              
            
!

JS

              
                 $(document).ready(function() {
   $('.check').blur(function() {
     var x = $(this).val();
     if (x != "") {
       $(this).next('label').addClass("top_lb");
     } else {
       $(this).next('label').removeClass("top_lb");
     }
   });
 });
              
            
!
999px

Console