cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-personicon-teamoctocatpop-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.

            
              <form id="form1">
  <fieldset>
    <legend>Sign Up</legend>
    <ul>
      <li>
        <label for="user">Enter your email address</label>
        <input type="email" name="user" id="user" placeholder="user@email.com" required>
        <span class='feedback'></span>
      </li>
      <li>
        <label for="password">Choose a password</label>
        <input type="password" name="password" id="password" required>
        <span class='feedback'></span>
        <div id="hint">Passwords must be 8-15 characters and contain:
          <ul>
            <li>at least one capital letter</li>
            <li>at least one lowercase letter</li>
            <li>at least one number</li>
          </ul>
        </div>
      </li>
      <li>
        <label for="verifyPassword">Re-enter your password</label>
        <input type="password" name="verifyPassword" id="verifyPassword" required>
        <span class='feedback'></span>
      </li>
      <li>
        <input type="submit" value="Register me!">
      </li>
    </ul>
  </fieldset>
</form>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Muli);
* {
  margin: 0;
  padding: 0; 
  font-family: Muli;
  color: #777777;
    -moz-box-sizing:border-box;
    -webkit-box-sizing:border-box;
    box-sizing:border-box;
}
ul {
  list-style: none;
  position: relative;
}
li {
  display: block;
  clear: both;
  margin: 20px 0;
  position: relative;
}
:not(.valid) .feedback:after {
  content: '\263a';
  color: #E6E6E6;
  font-size: 36px;
  display: block;  
  margin: auto;
  width: 86px;
  position: absolute;
  top: 20%;
  left: 100%;
}
.error ~ .feedback:after {
  content: '\2639';
  color: red;
}
.valid ~ .feedback:after,
:valid .feedback:after {
  content: '\263b';
  color: green;
}
li:hover label, li:focus label {
  color: #333333;
}
form {
  width: 90%;
  max-width: 540px;
  margin: 2rem auto;
}
fieldset {
  border: 2px #888888 solid;
  border-radius: 12px;
  position: relative;
  width: 100%;
  padding: 20px 120px 40px;
}
legend {
  display: block;
  width: 100px;
  text-align: center;
  position: absolute;
  top: -15px;
  left: 0; 
  right: 0;
  margin: auto;
  background: white;
  font-size: 22px;
}
label, input {
  display: block;
  margin: 0 auto;
  width: 100%;
}
label {
  text-align: center;
}
input {
  line-height: 2;
  padding: 2px 4px;
  font-size: 14px;
}
input[type=submit] {
  text-align: center;
  display: block;
  color: white;
  /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#fcedf2+0,f9a7c1+50,fc8aae+51,ff7ca6+100 */
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#d15580+0,b72a59+50,a80038+51,c92e62+100 */
background: #d15580; /* Old browsers */
background: -moz-linear-gradient(top,  #d15580 0%, #b72a59 50%, #a80038 51%, #c92e62 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#d15580), color-stop(50%,#b72a59), color-stop(51%,#a80038), color-stop(100%,#c92e62)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  #d15580 0%,#b72a59 50%,#a80038 51%,#c92e62 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  #d15580 0%,#b72a59 50%,#a80038 51%,#c92e62 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  #d15580 0%,#b72a59 50%,#a80038 51%,#c92e62 100%); /* IE10+ */
background: linear-gradient(to bottom,  #d15580 0%,#b72a59 50%,#a80038 51%,#c92e62 100%); /* W3C */
}
:valid input[type=submit] {
  /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#bfd255+0,8eb92a+50,72aa00+51,9ecb2d+100;Green+Gloss */
background: #bfd255; /* Old browsers */
background: -moz-linear-gradient(top,  #bfd255 0%, #8eb92a 50%, #72aa00 51%, #9ecb2d 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#bfd255), color-stop(50%,#8eb92a), color-stop(51%,#72aa00), color-stop(100%,#9ecb2d)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  #bfd255 0%,#8eb92a 50%,#72aa00 51%,#9ecb2d 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  #bfd255 0%,#8eb92a 50%,#72aa00 51%,#9ecb2d 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  #bfd255 0%,#8eb92a 50%,#72aa00 51%,#9ecb2d 100%); /* IE10+ */
background: linear-gradient(to bottom,  #bfd255 0%,#8eb92a 50%,#72aa00 51%,#9ecb2d 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#bfd255', endColorstr='#9ecb2d',GradientType=0 ); /* IE6-9 */
}
#hint {
  display: none;
  color: red;
  font-size: 12px;
  position: absolute;
  top: 0;
  left: 110%;
  width: 200px;
  border-radius: 8px;
  background: lightblue;
  padding: 10px;
  box-shadow: 1px 0 2px #777;
}
#hint:before {
  content: "";
  position: absolute;
  top: 20px;
  left: -26px; 
  border-top: 12px solid transparent; 
  border-right: 26px solid lightblue; 
  border-bottom: 12px solid transparent;
}
#hint li {
  margin: 0;
  padding: 0;
  line-height: 1;
}
#password:focus ~ #hint {
  display: block;
}
            
          
!
            
              $("#form1").validate({
  validClass: "valid",
  rules: {
    password: {
      required: true,
      rangelength: [8, 15],
      pattern: "^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,15}$"
    },
    verifyPassword: {
      equalTo: "#password"
    }
  }
});
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console