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

              
                <?php

include ('includes/config.php');

?>


    <!DOCTYPE html>

    <html>

    <head>

        <meta charset="UTF-8">

        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <title>Register an Account</title>

        <link rel="stylesheet" href="css/normalize.css">

        <link rel="stylesheet" href="css/style_signup.css">

    </head>

    <body>




        <div class="container">
            <div class="student">
                <h1>Student</h1>
                <hr>
                <div class="option">

                    <img class="btn-employer" src="https://cdn2.iconfinder.com/data/icons/employment-business-2/256/Businessman_and_globe-512.png"
                        alt="Employer">
                    <img class="btn-student active" src="https://image.freepik.com/freie-ikonen/graduierung_318-1944.jpg" alt="Student">

                </div>
                <!-- option-->


                <form method="post" action="save.php">
                    <label for="regstu_usn">Username:</label>

                    <input type="text" id="reg_username" name="regstu_usn">
                    
                  
                  <div class="password">
                    <label for="regstu_pass">Password:</label>
                    <input id="reg_password" type="password"  name="regstu_pass">
                    <span>Enter a password longer than 8 characters</span>
                  </div>
                  <br>                  
                  
                  <div class="confirm-password">
                    <label for="confirm-password">Confirm Password:</label>
                    <input type="password" id="confirm-password" name="confirm-password">
                    <span>Please confirm your password</span>
                  </div>
                  <br>
                  
                    <label for="regstu_email">Email address:</label>
                    <input type="text" id="reg_email" name="regstu_email">
                    <br></br>

                    <button class="signUp-btn" type="submit">Sign up</button>
            </div>
          </form>
            


                <div class="employer">
                    <h1>Employer </h1>
                    <hr>
                    <div class="option">
                        <img class="btn-employer active" src="https://cdn2.iconfinder.com/data/icons/employment-business-2/256/Businessman_and_globe-512.png"
                            alt="Employer">
                        <img class="btn-student" src="https://image.freepik.com/freie-ikonen/graduierung_318-1944.jpg" alt="Student">
                    </div>
                    <form method="post" action="save.php">

                        <label for="regemp_usn">Username:</label>
                        <input type="text" id="reg_username" name="regemp_usn">
                        
                      <div class="password">
                        <label for="regemp_pass">Password:</label>
                        <input id="password" type="password" name="regemp_pass">
                        <span>Enter a password longer than 8 characters</span>
                      </div>
                      <br>
                      <div class="confirm-password">
                        <label for="confirm-password">Confirm Password:</label>
                        <input id="confirm_password" type="password"  name="confirm-password">
                        <span>Please confirm your password</span>
                      </div>
                        <br>
                      
                        <label for="regemp_email">Email address:</label>
                        <input type="text" id="reg_email" name="regemp_email">
                        
                        <label for="regemp_comp">Company:</label>
                        <input type="text" id="reg_company" name="regemp_comp">
                        
                        <label for="regemp_loc">Company location:</label>
                        <input type="text" id="reg_location" name="regemp_loc">
                        
                        <button class="signUp-btn" type="submit">Sign up</button>
                </div>
                  </form>
                <script src="https://code.jquery.com/jquery-3.1.1.js" integrity="sha256-16cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA=" crossorigin="anonymous"></script>
                <script src="https://code.jquery.com/jquery-1.11.0.min.js" type="text/javascript" charset="utf-8"></script>
                <script src="js/register.js" type="text/javascript" charset="utf-8"></script>


                <p class="note">Already have an account? <a href="login.php">Log In!</a></p>

                <br />
                <p class="note">19.2.2017</p>


                <script src="https://code.jquery.com/jquery-3.1.1.js" integrity="sha256-16cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA=" crossorigin="anonymous"></script>
                <script src="https://code.jquery.com/jquery-1.11.0.min.js" type="text/javascript" charset="utf-8"></script>
                <script src="js/sign-up.js" type="text/javascript" charset="utf-8"></script>


    </body>

    </html>
              
            
!

CSS

              
                /********
GENERAL
********/
body, html, .employer, .student, .option{
  padding:0;
  margin: 0;
}
  
h1, h2, h3, h4, h5, h6, p, label{
    font-family : 'Droid Sans', sans-serif;

}

body {
background : url('https://www.xmple.com/wallpaper/linear-blue-white-gradient-1920x1080-c2-6495ed-ffffff-a-60-f-14.svg');
}

h1 {
  text-align: center;
  color: white;
}

.container {
  margin: 5% 25% 0;
}



/******
GENERAL 
.employer, student
******/

.employer, .student {
  padding: 5%;
  box-shadow : 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  border-radius: 1%;
}

.employer {
  background : rgba(0, 0, 102, 0.3);
}

.student {
  background : rgba(20, 200, 204, 0.5);
}



/******
version 16.03
version 21.03
INPUT
*******/

input[type="text"],
input[type="password"],
input[type="date"],
input[type="datetime"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="time"],
input[type="url"],
textarea,
select {
  background: rgba(255,255,255,0.1);
  border: none;
  font-size: 16px;
  margin: 0;
  padding: 8px 0 8px 0;
  width: 100%;
  background-color: rgb(233,233,233);
  color: rgb(2,2,2);
  margin: 0 0 20px 0;
  border-radius: 2.5%;
  text-indent: 5px;
}

input[type="text"]:focus,
input[type="password"]:focus {
  background: rgb(255,255,255);
}

/*****
LABEL
*****/
.student label, .employer label {
  font-weight : bold;

  color: black;
  opacity : 0.7;
  font-size : 1em;
}



/****
OPTION
****/
.option{
  text-align: center;
  margin: 4% 0 14% 0;
}

.option img{
  margin: 0 5% 0 0;
}


/*********
SWITCH BUTTON
*********/

.btn-employer, .btn-student{
  max-height : 4.0em;
  margin: 10px 10px 24% 10px;
  background-color: #ffffff;
  box-shadow: 0px 1px 1px rgb(244,244,244);
  
}

.btn-employer:hover, .btn-student:hover{
  cursor: pointer;
  box-shadow: 1px 0px 55px rgba(255,255,255,0.9);
}

.btn-employer:active, .btn-student:active{
  box-shadow: 1px 1px 100px rgb(244,244,244);
}

.active{
  box-shadow: 1px 0px 55px rgba(255,255,255,0.9);
}

/******
SPAN
*****/
.password{
  position: relative;
}

.confirm-password{
  position: relative;
}

span{
  margin: 0;
  color: rgba(255,20,20,0.9);
  font-size: 0.9em;
  font-weight: bold;
  position: absolute;
  top: 52px;
  display: block;
  
}


/*****
signUp button
****/

.signUp-btn {
  background : rgb(0, 102, 255);
  border-radius : 5%;
  border : rgb(0, 52, 200);
  box-shadow : 0 7px 5px rgba(0, 52, 200, 0.8);
  margin : 5% 0 0 0;
  padding : 4% 0;
  color : #ffffff;
  font-size : 1.15em;
  font-weight : bold;
  width: 100%;  
  transition: all ease 0.3s;
}

.signUp-btn:active{
  box-shadow : 0 2px 5px rgb(0, 52, 200);
  position: relative;
  top: 3px;
  border: solid 3px rgb(255, 255, 255);
  
  
}

.signUp-btn:hover {
  cursor : pointer;
  background-color: rgb(0, 112, 255);
  border: solid 0.5px rgb(50, 152, 255);
  
}

/********
NOTE
********/

.note a {
color : rgb(255, 111, 222);
}

.note {
color : blue;
font-size : 22px;
}

.note a {
color : rgb(1, 1, 1);
font-size : 1.5em;
}

.note a:hover {
color : rgb(15, 115, 199);
}


/*********
MEIDA QUERIES
********/
@media screen and (min-width: 900px){
  .container{
    margin: 2% 35%;
    
  }
  
  .employer, .student{
    
    
  }
  
  
}

@media screen and (min-width: 180px) and (max-width: 900px){
  
  body, html{
    font-size: 0.9em;
    
  }
  
  input[type="text"],
  input[type="password"]{
    height: 15px;  
    margin: 0.5% 0 5% 0;
    
  }
  
  .employer, .student{
    
  }
}
              
            
!

JS

              
                /**********
SWTICH FORMS
********/
$(".student").hide();
/*
employer
*/

$(".employer .btn-student").click(function(){
  
  $("div .student").fadeIn();
  $(".employer").fadeOut();
});



/*
STUDENT
*/

$(".student .btn-employer").click(function(){
  $("div .employer").fadeIn();
  $(".student").fadeOut();
});


/*****
password confirm
*****/
//Problem: Hints are shown even when form is valid
//Solution: Hide and show them at appropriate times
var $password = $("#password");
var $confirmPassword = $("#confirm_password");

//Hide hints
$("form span").hide();

function isPasswordValid() {
  return $password.val().length > 8;
}

function arePasswordsMatching() {
  return $password.val() === $confirmPassword.val();
}

function canSubmit() {
  return isPasswordValid() && arePasswordsMatching();
}

function passwordEvent(){
    //Find out if password is valid  
    if(isPasswordValid()) {
      //Hide hint if valid
      $password.next().hide();
    } else {
      //else show hint
      $password.next().show();
    }
}

function confirmPasswordEvent() {
  //Find out if password and confirmation match
  if(arePasswordsMatching()) {
    //Hide hint if match
    $confirmPassword.next().hide();
  } else {
    //else show hint 
    $confirmPassword.next().show();
  }
}



//When event happens on password input
$password.focus(passwordEvent).keyup(passwordEvent).keyup(confirmPasswordEvent).keyup(enableSubmitEvent);

//When event happens on confirmation input
$confirmPassword.focus(confirmPasswordEvent).keyup(confirmPasswordEvent).keyup(enableSubmitEvent);



              
            
!
999px

Console