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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <script src='https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js'></script>
<link href='http://fonts.googleapis.com/css?family=Roboto:400' rel='stylesheet' type='text/css'>
<body>
  <form id="survey-form" novalidate="novalidate"> <!--removes browser hover text-->
    <div class="bg-header">
    <div class="form-card">
      <h1 id="title">FCC Survey Form</h1>
      <p id="description">This is the second project in the FreeCodeCamp track. Please fill this form out to the best of your ability.<br><br><span class="asterisk">* Required</span></p>
 <!---1st option -->
      <div class="form-option">
        <input type="text" id="name" class="question-answer" placeholder=" " required>
        <span class="bar"></span>
        <label class="question-label" id="name-label" >Username<span class="asterisk"> *</span></label>
      </div>
<!---2nd option -->
      <div class="form-option">
        <input type="email" id="email" class="question-answer" placeholder=" " required>
        <span class="bar"></span>
        <label class="question-label" id="email-label">Email<span class="asterisk"> *</span></label>
          <div class="requirements">
            Must be a valid email address
          </div>
      </div>
<!---3rd option -->
      <div class="form-option">
        <input type="text" id="fav-colour" class="question-answer" required> 
        <span class="bar"></span>
        <label class="question-label">What is your favourite colour?</label>
      </div> <!--form-option end div-->
<!--4th option -->
      <div class="form-option">
        <input type="number" id="number" class="question-answer" min="3" max="99" placeholder=" " required>
        <span class="bar"></span>
        <label class="question-label" id="number-label">How old are you?</label>
      </div> <!--form-option end div-->
<!--5th option -->
      <div class="form-option">
        <select class="dropdown" required id="dropdown">
          <option value="" disable selected></input>
          <option value="1">Full-time Job</input>
          <option value="2">Part-time Job</input>
          <option value="3">Student</option>
        </select>
        <span class="bar"></span>
        <label class="question-label" id="select-label" class="question-answer">What is your current position?<span class="asterisk"> *</span></label>
      </div> <!--form-option end div-->
<!--6th option -->
      <div class="radio-option">
        <div class="radio-section">
          <fieldset>
            <legend>How likely are you to recommend FCC to a friend?</legend>
              <div class="radio-selector">
                <label><input type="radio" class="radiobtn" value="1" name="recommend" id="btn1" checked>
                <label for="btn1">Definitely</label>
                <div class="checkmark"></div></label>
              </div><!--name attribute allows only one radio in group to be selected-->
              <div class="radio-selector">
                <label><input type="radio" class="radiobtn" value="2" name="recommend" id="btn2">
                <label for="btn2">Maybe</label>
                <div class="checkmark"></div></label>
              </div>
            <div class="radio-selector">
                <label><input type="radio" class="radiobtn" value="3" name="recommend" id="btn3">
                <label for="btn3">Not sure</label>
                <div class="checkmark"></div></label>
              </div>
            <!--wrap each radio and button in div to keep on separate lines-->
          </fieldset>
        </div> <!--radio-section end div -->
        <div class="radio-option">
        <div class="checkbox-section">
          <fieldset>
            <legend>Things that should be improved in the future (Please choose all that apply):</legend>
              <div class="radio-selector">
                <label><input type="checkbox" class="checkbtn" value="1" name="change" id="checkbtn1" checked>
                <label for="checkbtn1">Front-End projects</label>
                <div class="multi-checkmark"></div></label>
              </div><!--name attribute allows only one radio in group to be selected-->
              <div class="radio-selector">
                <label><input type="checkbox" class="checkbtn" value="2" name="change" id="checkbtn2">
                <label for="checkbtn2">Back-End projects</label>
                <div class="multi-checkmark"></div></label>
              </div>
              <div class="radio-selector">
                  <label><input type="checkbox" class="checkbtn" value="3" name="change" id="checkbtn3">
                  <label for="checkbtn3">Data Visualisation</label>
                  <div class="multi-checkmark"></div></label>
              </div>
              <div class="radio-selector">
                  <label><input type="checkbox" class="checkbtn" value="4" name="change" id="checkbtn4">
                  <label for="checkbtn4">Challenges</label>
                  <div class="multi-checkmark"></div></label>
              </div>
              <div class="radio-selector">
                  <label><input type="checkbox" class="checkbtn" value="5" name="change" id="checkbtn5">
                  <label for="checkbtn5">Algorithms</label>
                  <div class="multi-checkmark"></div></label>
              </div>         
              <div class="radio-selector">
                  <label><input type="checkbox" class="checkbtn" value="6" name="change" id="checkbtn6">
                  <label for="checkbtn6">Gitter help rooms</label>
                  <div class="multi-checkmark"></div></label>
              </div>
            <!--wrap each radio and button in div to keep on separate lines-->    
          </fieldset>
          </div> <!--checkbox-section end div -->
          <div class="form-option">
            <label class="question" id="comment-label">Any comments or suggestions?</label>
            <textarea id="comments" class="comment-box" style="height:100px;width:400px;resize:both;" name="comment" placeholder="Enter your comments here..."></textarea>
          </div> <!--form-option end div-->
          <div class="submit-button">
            <label for="submit"><input class="button" type="submit" value="Submit" id="submit"></label>
          </div>
      </div> <!--radio-option end div-->  
      </div> <!--form-card end div-->
    </div> <!--bg-header end div-->
  </form>
</body>


            
          
!
            
              body {
  margin: 0;
  background-color: #e8f4ff;
  font-family: 'Roboto', sans-serif;
}
h1 {
  text-align: center;
  padding-top: 1.5rem;
}
.bg-header  {
  display: flex;
  flex-direction: column;
  background-color: #3483d1;
  height: 200px;
}
.form-card {
  margin: 0 auto;
  background-color: white;
  max-width: 50em;
  padding: 5px 35px 20px 35px;
  margin-top: 5em;
  border-top: 8px solid #80baed;
  box-shadow: 0px 4px 15px 1px rgba(0,0,0, 0.25);
  border-radius: 3px;
}
.form-option {
  position: relative;
  margin-bottom: 35px;
}
.asterisk {
  color: red;
}
.form-option input {
  font-size: 18px;
  padding: 0px 10px 2px 5px;
  display: block;
  width: 300px;
  border: none; /*Hides border around input*/
  border-bottom: 1px solid #8c8c8c;
}
input:focus, select:focus {
  outline:none;
}

.form-option label {
  color: #999;
  font-size: 20px;
  position: absolute;
  pointer-events: none;
  bottom: 4px;
  transition: 0.2s ease all;
}
/*Active state for label- moves text*/
.question-answer:focus ~.question-label, .question-answer:valid ~.question-label, /*~ selects every <question-answer> element that is preceded by <question-label> element*/
select:focus ~.question-label, select:valid ~.question-label {
  top: -16px;
  font-size: 14px;
  color: #4285f4;
}
.question-answer:empty {
  background-color: #FFF !important;
}
input[type="email"]:valid + label {
  opacity: 0;
}
.requirements {
  padding-top: 5px;
  font-style: italic;
  color: red;
  opacity: 0;
  display: none;
}
input[type="email"]:invalid ~.question-label {
  top: -16px;
  font-size: 14px;
  color: red;
}
input[type="email"]:valid ~.question-label {
opacity: 0;
}
input[type="email"]:invalid:focus ~.requirements {
  opacity: 100;
  display: block;
}

.dropdown {
	position: relative;
	font-family: inherit;
	background-color: ;
	width: 315px;
  height: 40px;
	padding: 10px 10px 10px 0;
	font-size: 18px;
	border: none;
	border-bottom: 1px solid #8c8c8c;
}

/*Bottom borders for input*/
.bar {position: relative; display: block; width: 315px;}
.bar:before, .bar:after {
  content: '';
  height: 2px;
  width: 0;
  position: absolute;
  background: #4285f4;
  transition: 0.2s ease all;
}
.bar:before {
  left:50%;
}
.bar:after {
  right: 50%; 
}
/* active state for bottom border bar */
select:focus ~.bar:before, select:focus ~.bar:after,
input:focus ~.bar:before, input:focus ~.bar:after {
  width: 50%;
}
fieldset {
  border: none;
}
legend {
  position: relative;
  margin-left: -17px;
  color: #999;
  font-size: 20px;
  border: none;
  padding-bottom: 12px;
}
.radio-selector label {
  color: #999;
  font-size: 20px;
  cursor: pointer;
}
.radio-selector {
  height: 45px;
  width: 200px;
}
/* Hide the browser's default radio buttons */
.radio-selector input {
  position: relative;
  opacity: 0;
}
.checkmark {
  position: relative;
  top: -25px;
  left: -10px;
  height: 25px;
  width: 25px;
  border: solid #999 2px; 
  border-radius: 50%;
  cursor: pointer;
}
.radio-selector:hover input ~ .checkmark,
.radio-selector:hover input ~ .multi-checkmark {
  border: solid #4285f4 2px;
}
.radio-selector input:checked ~ .checkmark {
    border: solid #4285f4 2px;
}
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}
.radio-selector input:checked ~ .checkmark:after {
    display: block;
}
/* blue dot inside radio button */
.radio-selector .checkmark:after {
  transform: scale(1.1);
  transition: 0.2s ease all;
  top: 5px;
	left: 5px;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background: #4285f4;
}
/* checkboxes */
.multi-checkmark {
  position: relative;
  top: -25px;
  left: -10px;
  height: 25px;
  width: 25px;
  border: solid #999 2px;
  cursor: pointer;
}
/* background when checkbox is checked */
.radio-selector input:checked ~ .multi-checkmark {
  background: #4285f4;
  border-color: #4285f4;
}
/* checkmark inside checkbox when checked */
.multi-checkmark:after {
  content: "";
  position: absolute;
  display: none;
}
/* checkmark shows when checked */
.radio-selector input:checked ~ .multi-checkmark:after{
  display: block;
}
/* style checkmark */
.radio-selector .multi-checkmark:after {
  left: 9px;
  top: 5px;
  width: 5px;
  height: 10px; /* makes L shape for tick */
  border: solid white;
  border-width: 0 3px 3px 0;
  /*-webkit-transform: rotate(45deg);*/
  transform: rotate(45deg);
}
#comment-label {
  position: absolute;
  padding-top: -20px;
  top: 0px;
}
.comment-box {
  position: relative;
  top: 50px;
  border: 2px solid #999;
  border-radius: 3px;
}
.comment-box:focus {
  outline: none;
  border: 2px solid #4285f4;
}
#submit {
  padding: 12px;
  border-radius: 3px;
  margin: 6% 50%;
  background-color: #4285f4;
  color: white;
  border: 0px;
  text-align: center;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console