Pen Settings



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


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


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.


                <h1>Create Account Modal</h1>
  <div onclick="overlayFunction(event)" class="overlay"></div>
    <div class="container">
      <div class="wrapper">
        <button onclick="buttonFunction(event)" class="button">Create Account</button>
        <div class="modal">
            <input type="text" name="name" placeholder="Name">
            <input type="email" name="email" placeholder="Email">
            <input type="password" name="password" placeholder="Password">
            <input type="password" name="confirm" placeholder="Confirm Password">
            <input class="submit" type="submit" value="Submit">
          <p onclick="overlayFunction(event)" class="close">Close</p>


                html, body{
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', sans-serif;
  background-color: #eee;
  color: #333;

  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;

  text-decoration: none;

h1, h2, h3, h4, h5, h6{
  font-weight: 200;
  text-align: center;

p, li, a{
  font-size: 14px;

.button, input{
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

/* GRID */

.twelve { width: 100%; }
.eleven { width: 91.53%; }
.ten { width: 83.06%; }
.nine { width: 74.6%; }
.eight { width: 66.13%; }
.seven { width: 57.66%; }
.six { width: 49.2%; }
.five { width: 40.73%; }
.four { width: 32.26%; }
.three { width: 23.8%; }
.two { width: 15.33%; }
.one { width: 6.866%; }


.col {
	display: block;
	margin: 1% 0 1% 1.6%;

.col:first-of-type {
  margin-left: 0;

  width: 100%;
  height: 100%;
  max-width: 940px;
  margin: 0 auto;
  position: relative;


.cf:after {
    content: " ";
    display: table;

.cf:after {
    clear: both;

.cf {
    *zoom: 1;


  position: absolute;
  width: 100%;
  top: 0;
  left: 50%;
  margin-left: -300px;
  max-width: 600px;
  width: 600px;
  z-index: 500;


  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  background-color: rgba(0,0,0,0);

  background-color: rgba(0,0,0,0.6);

/* BUTTON */

.button, .submit{
  outline: none;
  border: none;
  margin: 30px auto 0 auto;
  display: inherit;
  padding: 12px 30px;
  background-color: #3498db;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease-in-out;

  width: 100%;
  cursor: auto;
  padding: 18px;

/* MODAL */

.modal form .submit{
  margin-top: 20px;

  background-color: #fff;
  padding: 20px;
  opacity: 0;
  -webkit-transform: rotate(20deg);
  -ms-transform: rotate(20deg);
  -o-transform: rotate(20deg);
  transform: rotate(20deg);
  -webkit-transform-origin: top left;
  -moz-transform-origin: top left;
  -ms-transform-origin: top left;
  -o-transform-origin: top left;
  transform-origin: top left;
  opacity: 1;
  -webkit-transform: rotate(0deg);
  -ms-transform: rotate(0deg);
  -o-transform: rotate(0deg);
  transform: rotate(0deg);
  -webkit-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  -webkit-transition-delay: 0.3s;
  -o-transition-delay: 0.3s;
  transition-delay: 0.3s;

.modal form input{
  display: block;
  margin: 15px auto;

.modal form input[type="text"], .modal form input[type="email"], .modal form input[type="password"]{
  border: none;
  outline: none;
  padding: 10px;
  background-color: #eee;
  width: 55%;

  color: #aaa;
  cursor: pointer;
  text-align: center;
  margin-top: 20px;
  font-size: 12px;

  color: #3498db;



                var modal = document.querySelector(".modal");
var overlay = document.querySelector(".overlay");
var wrapper = document.querySelector(".wrapper");
var button = document.querySelector(".button");

function buttonFunction(event){

function overlayFunction(event){