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. 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

JavaScript

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

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

              
                <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
  </head>
    <title>FCC Forms</title>
<body>
    <div class="container">
       <div class="container-top" style="background-image: url(https://images.unsplash.com/photo-1562145259-610b3d3ca6ab?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1567&q=80);">
        <h1 id="title">Survey form</h1>
    <p id="description">Thank you for taking the time to complete this survey</p>
       </div>
    <div class="container-right">
        <form id="survey-form">

        
<label for="name" id="name-label">
    <span>Name: </span>
<input type="text" name="name" id="name" placeholder="Enter your Name" class="name-text" required>
</label>

<label for="email" id="email-label">
    <span>Email: </span>
    <input type="email" name="email" id="email" placeholder="Enter your Email" required class="name-text">
</label>

<label for="number" id="number-label">
   <span> Number:</span> 
<input type="number" name="number" id="number" max="50" min="18" class="name-text" placeholder="Enter your age">
</label>

<p>How did you know about us?</p>
<select  id="dropdown">
    <option value="" disabled selected>Select your option</option>
<option value="facebook">Facebook</option>
<option value="twitter">Twitter</option>
<option value="linkedin">Linkedin</option>
<option value="friend">Friend</option>
</select>

<p>Would you recommend our services to a friend?</p>
<label for="referral">
<input type="radio" id="referral" name="referral" value="yes">Yes
</label>
<label for="no">
    <input type="radio" id="no" name="referral" value="no">No
</label>
<label for="maybe">
    <input type="radio" id="maybe" name="referral" value="maybe">Maybe
</label>

<p>What is your area of expertise?</p>
<label>
<input type="checkbox" name="expertise" value="html" >Html
</label>
<label>
<input type="checkbox" name="expertise" value="javascrîpt">Javascript
</label>
<label>
<input type="checkbox" name="expertise" value="python">Python
</label>
<label>
<input type="checkbox" name="expertise" value="java">Java
</label>
<label>
<input type="checkbox" name="expertise" value="css">CSS
</label>

<p>Please leave a comment</p>
<textarea name="comment" cols="30" rows="10" placeholder="Enter your comment here.."></textarea>
 
    <div class="submit-cont">
<input type="submit" value="submit" class="button-form" id="submit">
</div>

</form>
</div>

</div>
</body>
</html>
              
            
!

CSS

              
                * {
    box-sizing: border-box;
}


body {
    font-family: 'Jost', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: rgb(61, 61, 61);
    margin: 0;
    /* background-image: url(https://images.unsplash.com/photo-1494894194458-0174142560c0?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1500&q=80); */
background-color: #E3E3E3;
    background-repeat: no-repeat;

}

h1 {
text-align: center;
text-transform: uppercase;
font-size: 2.5em;
font-weight: 800;
color: #fff;
margin-bottom: 0;

}

p {
    font-size: 1em;
    font-weight: 600;
    color: rgb(110, 110, 110);
}

#description {
font-size: .9em;
color: #fff;
text-align: center;
margin-top: 0;

}

/* img {
    width: 100%;
    height: 100%;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
} */

.container {
   max-width: 800px;
   margin: 300px auto;
   display: flex;
   flex-direction: column;
   
   /* outline: 2px solid red; */
}

@media screen and (max-width: 600px){
  .container {
    margin: auto;
  }
  
}

.container-top {
    width: 100%;
background-repeat: no-repeat;
background-size: cover;
padding: 2.5em 1em;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}

.container-right {
    width: 100%;
    padding: 2.5em;
    display: block;
background-color: #fff;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}

#survey-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5em 2em

}


#name-label, #email-label, #number-label {
    display: flex;
    flex-direction: row;
  
    
}

@media screen and (max-width: 600px) {
#name-label, #email-label, #number-label {
    display: block;
}

}

.name-text {
width: 100%;
outline: none;
border: none;
border-bottom: 1px solid rgba(105, 105, 105, 0.3);
padding-bottom: .5em;
color: rgb(90, 90, 90);
font-size: 1em;
font-family: "Jost", sans-serif;
font-weight: 600;
  margin-bottom: 2em;

}

::placeholder {
    color: rgb(134, 134, 134);
    font-size: 1em;
    font-weight: 500;
    font-family: "Jost", sans-serif;
}

input:focus {
    border-bottom: 1px solid orangered;
}


span {
    display: block;
    padding-right: 1.5em;
    padding-bottom: .5em;
    color: rgb(110, 110, 110);
    font-size: 1em;
    font-weight: 600;
}







.button-form {
    border: none;
    outline: none;
   display: block;
    width: 160px;
    height: 50px;
    margin: 10px auto 0 auto;
    background-color: rgb(255, 102, 0);
    border-radius: 15px;
    color: white;
    box-shadow: 0px 8px 10px 0px rgba(0, 0, 0, 0.2);
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;

}

input[type="submit"]:hover {
    background-color: rgb(197, 82, 5);
}

textarea {
    color: rgb(90, 90, 90);
    font-size: 1em;
    font-weight: 600;
    font-family: "Jost", sans-serif;
}


              
            
!

JS

              
                
              
            
!
999px

Console