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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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

              
                <!-- START .site-form -->
  <div class="site-form">
  <input type="text" name="firstname" value="First name" required>
  <input type="text" name="lastname" value="Last name" required>
  <input type="text" name="email" value="Email" required>
  <input type="text" name="phonenumber" value="Phone number" required>
  <div class="fileupload">
    <button class="uploadfile"></button>
  <input type="file" name="myfile" />
    
    <button id="openPopup">Submit</button>
    </div>	
	</div><!-- END .site-form -->




<div id="permissionPopup" class="windowPopup">
  <div class="permissiontext">
    <form id="submitform" action="">
    <span class="close">&times;</span>
    <p>Lorem ipsum, or lipsum as it is sometimes known, is dummy text used in laying out print, graphic or web designs. The passage is attributed to an unknown typesetter in the 15th century who is thought to have scrambled parts of Cicero's De Finibus Bonorum et Malorum for use in a type specimen book.</p>
    <p>It usually begins with: “Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.” The purpose of lorem ipsum is to create a natural looking block of text (sentence, paragraph, page, etc.) that doesn't distract from the layout.</p>
    
    <button class="agree">I agree</button>
  </div>
</div>
              
            
!

CSS

              
                .site-form input{
            font-size: 1.1em;
            background-color: #fff;
            padding: 10px 20px;
            margin: 5px 10px;
            font-weight: 500;
            border-radius: 10px;
            color: #000;
            border: 1px solid #000;
            text-align: center;
            text-transform: capitalize;
            width: 12.6em;
            display: block;
          }
          .site-form button{
            font-size: 1.1em;
            background-color: #ED171F;
            padding: 10px 50px;
            margin: 10px;
            font-weight: 500;
            text-transform: uppercase;
            border-radius: 10px;
            color: #fff;
            border: 0;
            display: block;
          }
        .site-form button:hover{ background-color: #000;}
        .fileupload{
          position: relative;
          overflow: hidden;
          display: inline-block;
          margin-bottom: 20px;
          }
        button.uploadfile {
          border: 1px solid #000;
          padding: 8px 20px;
          border-radius: 8px;
          font-size: 1.1em;
          height: 8em;
          width: 14.8em;
          background: #fff url('https://i.ibb.co/JKb99gK/uploadicon.jpg') center;
          background-repeat: no-repeat;
          color: #000;
          text-transform: capitalize;
        }
        .fileupload input[type=file] {
          font-size: 100px;
          position: absolute;
          left: 0;
          top: 0;
          opacity: 0;
        }

.windowPopup {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  padding-top: 150px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.permissiontext {
  background-color: #fefefe;
  margin: auto;
  padding: 30px;
  border: 0px solid #888;
  width: 60%;
  text-align: center;
}

.close {
  color: #aaaaaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  margin: 0px 0px 20px 20px;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

button.agree{ background: red;
			  color: white;
              padding: 10px 60px; 
              border: 0;
              text-transform: uppercase;
              border-radius: 12px;
              font-size: 1em;
              margin: 20px 10px;
              }
              button.agree:hover{ background: black;
              }
              
            
!

JS

              
                var modal = document.getElementById("permissionPopup");
var open = document.getElementById("openPopup");

var span = document.getElementsByClassName("close")[0];
var agree = document.getElementsByClassName("agree")[0];

open.onclick = function() {
  modal.style.display = "block";
}

// Close popup with <span> (x) and/or button (I agree)
span.onclick = function() {
  modal.style.display = "none";
}
agree.onclick = function() {
  modal.style.display = "none";
}

// Clicks anywhere outside of the window = close the window
window.onclick = function(event) {
  if (event.target == modal) {
    modal.style.display = "none";
  }
}

function myFunction() {
  document.getElementById("submitform").submit();
}
              
            
!
999px

Console