Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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="main-container">
      <div id="sign-up" class="left-container sign-up hidden">
        <h1>So let's sign up</h1>
        <div style="width: 100%;">
          <form action="index.html" class="signup-form">
            <input type="text" id="first-name" placeholder="First Name">
            <input type="text" id="last-name" placeholder="Last Name">
            <input type="email" id="email" placeholder="E-mail">
            <input type="password" id="password" placeholder="Password">
            <div class="check">
              <input type="checkbox" onclick="checkTerms()" id="agree-terms">
              <label for="agree-terms">Agree to
                <a href="#">Terms &amp; Conditions</a>
              </label>
            </div>
            <button type="submit" id="signup_submit" class="button sign-up-btn disabled" disabled>Sign Up</button>
          </form>
        </div>
        <div class="signin-link-container">
          <p  onclick="changeToLogin()" class="signin-link">ALready have an account? Click here!</p>
        </div>
      </div>

      <div id="log-in" class="left-container log-in">
        <h1>So let's log in</h1>
        <div style="width: 100%;">
          <form action="index.html" class="signup-form">
            <input type="email" id="email" placeholder="E-mail">
            <input type="password" id="password" placeholder="Password">
            <button type="submit" id="submit" class="button log-in-btn" disabled>Login</button>
          </form>
        </div>
        <div class="login-link-container">
          <p onclick="changeToSignup()" class="login-link">Don't have an account? Click here!</p>
        </div>
      </div>

      <div class="right-container"></div>
    </div>
              
            
!

CSS

              
                body {
  background-image: linear-gradient(to top right, #3f51b5, #e91e63);
  min-height: 100vh;
  margin: 0;
  font-family: 'Secular One', sans-serif;
}
h1{
  margin: 0;
}
a {
  text-decoration: none;
  color: #0d28c0;
}

a:hover{
  color: #071561;
}

.main-container {
  display: flex;
  width: 70%;
  height: 700px;
  min-height: 80vh;
  background-color: white;
  margin: 10vh auto;
  border-radius: 12px;
  box-shadow: 5px 5px 20px 0px rgba(0, 0, 0, 0.5);
}

.main-container .hidden{
  display: none;
}

.login-link {
  color: #777;
}

.login-link:hover {
  color: #333;
  cursor: pointer;
}

.left-container {
  width: 40%;
  height: 100%;
  background-color: white;
  border-radius: 10px 0 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}

left-container > * {
  transition: all 0.3s;
}

.right-container {
  width: 60%;
  height: 100%;
  background-image: url('https://images.unsplash.com/photo-1519408469771-2586093c3f14?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2147&q=80');
  background-position: center;
  background-size: cover;
  border-radius: 0 10px 10px 0;
}
.signup-form {
  width: 70%;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.signup-form input {
  border-radius: 200px;
  padding: 5px 15px;
  height: 2rem;
  font-size: 1rem;
  background-color: #ddd;
  color: #444;
  border: none;
}

.signup-form input {
  display: block;
  margin-top: 1rem;
  width: 100%;
  font-family: inherit;
}

.signup-form input.first-name,
.signup-form input.last-name {
  width: 48%;
}

.signup-form input:focus {
  outline: none;
}

.signup-form input[type='checkbox']{
  margin: 1rem 0.5rem 1rem 0;
}

.signup-form input[type='checkbox'],
.signup-form input[type='checkbox'] + label {
  display: inline-block;
  width: auto;
}

.signup-form .check{
  display: flex;
  align-items: center;
}

.signup-form button {
  color: white;
  background-color: #bf360c;
  border: none;
  padding: 1rem;
  font-family: inherit;
  border-radius: 10px;
  font-size: 1.5rem;
  display: block;
  width: 50%;
  margin: auto;
  margin-top: 2rem;
}

.signup-form button:hover{
  background-color: #83260a;
  cursor: pointer;
}

button.disabled {
  color: grey;
  background-color: darkgrey;
}

button.disabled:hover {
  color: grey;
  background-color: darkgrey;
  cursor: unset;
}

.signin-link {
  color: #777;
}

.signin-link:hover {
  color: #333;
  cursor: pointer;
}

@media (max-width:1240px){
  .left-container{
    width: 50%;
  }
  .right-container{
    width: 50%;
  }
}

@media (max-width:970px){
  .signup-form button{
    font-size: 1rem;
  }
  .signup-form input[type="checkbox"] + label{
    font-size: 0.8rem;
  }
  .signin-link{
    font-size: 0.8rem;
  }
}

@media (max-width:950px) {
  .left-container{
    width: 100%;
    border-radius: 10px;
  }
  .main-container h1{
    font-size: 1.5rem;
    margin-top: 0.5rem;
  }
  .signup-form input{
    margin-top: 0.5rem;
  }
  .right-container{
    display: none;
  }
}

@media (max-width:550px){
  .main-container{
    width: 90%;
    left: 5%;
  }
}
              
            
!

JS

              
                const checkTerms = () => {
  let termsCheck = document.getElementById('agree-terms');
  let btn = document.getElementById('signup_submit');
  if (termsCheck.checked == true){
    btn.classList.remove("disabled");
    btn.disabled = false;
  }else{
    btn.classList.add("disabled");
    btn.disabled = true;
  }
}

let signUp = document.getElementById("sign-up");
let logIn = document.getElementById("log-in");

const changeToLogin = () => {
  signUp.classList.add("hidden");
  logIn.classList.remove("hidden");
}

const changeToSignup = () => {
  signUp.classList.remove("hidden");
  logIn.classList.add("hidden");
}
              
            
!
999px

Console