cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <div class="container">
  <div class="row">
    <div class="col-md-8 col-md-offset-2">
      <h1>Contact Form</h1>
      <form class="contact-form" autocomplete="off">
        <div class="row">
          <div class="col-md-6">
            <input type="text" id="name" name="Name" placeholder=" " required>
            <label for="name">Your name *</label>
          </div>
          <div class="col-md-6">
            <input type="email" id="email" name="E-mail" placeholder=" " required>
            <label for="email">Email *</label>
            <div class="requirements">Error text</div>
          </div>
        </div>
        <div class="row">
          <div class="col-md-12">
            <input type="text" id="message" name="Message" placeholder=" " required>
            <label for="message">Message *</label>
          </div>
        </div>
        <div class="row">
          <div class="col-md-6 captcha-wrap">
            <img src="http://denis-creative.com/wp-content/uploads/2017/06/captcha.jpg" alt="">
          </div>
          <div class="col-md-6">
            <button type="submit" class="btn">Send message</button>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>
            
          
!
            
              $tit: 'Titillium Web', sans-serif
$lato: 'Lato', sans-serif
$yellow: #ffba00
$dark: #161613
$red: #d3362a
h1
  margin-bottom: 30px
  font-family: $tit
  font-weight: bold
  text-align: center
.contact-form
  input
    border: 0 none
    border-bottom: 1px solid #b9b9b8
    width: 100%
    font-family: $lato
    font-size: 16px
    line-height: 32px
    padding: 5px
    margin-bottom: 45px
    outline: none
    background: #fff
  .captcha-wrap
    margin-bottom: 45px
  .btn
    font-size: 24px
    line-height: 54px
    border: none
    width: 100%
    padding: 10px
    font-weight: 700
    text-align: center
    outline: none
    border-radius: 4px
    &:hover
      background-color: darken($yellow, 5)
  label
    color: #7f7f7e
    position: absolute
    top: 8px
    left: 20px
    transition: 0.28s
  input:focus + label
    top: -20px
    font-size: 12px
  input:invalid
    box-shadow: none
  input:valid
    border-bottom: 1px solid $dark
  input:valid + label
    top: -20px
    font-size: 12px
  input:invalid:not(:focus):not(:placeholder-shown)
    border-bottom: 1px solid $red
  input:invalid:not(:focus):not(:placeholder-shown) + label
    top: -20px
    font-size: 12px
  input:invalid:focus:not(:placeholder-shown) ~ .requirements
    max-height: 20px
  .requirements
    position: absolute
    bottom: 20px
    padding: 0 5px
    max-height: 0
    transition: 0.28s
    overflow: hidden
    font-size: 14px
    line-height: 20px
    color: $red
            
          
!
999px
Loading ..................

Console