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

HTML

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<!-- header-->
<div id="title-area">
  <h1 id="title">Candy Bar Survey Form</h1>
</div>
<div id="form-bg">
  <p id="description">
    Dear candy-bar lovers, please fill-in the form as we need your suggestions.
  </p>
  <div>
    <form id="survey-form" action="/link-path">
      <!--Name -->
      <div class="row">
        <div class="left-row">
          <label id="name-label" for="name">* Name:</label>
        </div>
        <div class="right-row">
          <input type="text" id="name" name="name" placeholder="Your Name" class="input-area" required>
        </div>
      </div>
      <!--Email -->
      <div class="row">
        <div class="left-row">
          <label id="email-label" for="email">* Email:</label>
        </div>
        <div class="right-row">
          <input type="email" id="email" name="email" placeholder="Your Email" class="input-area" required>
        </div>
      </div>
       <!--Age -->
      <div class="row">
        <div class="left-row">
          <label id="number-label" for="number">* Age:</label>
        </div>
        <div class="right-row">
          <input type="number" id="number" class="number-arrow input-area" name="number" min="0" max="9" placeholder="Age" required>
        </div>
      </div>
      <!--Gender -->
      <div class="row">
        <div class="left-row">
          <label id="gender" for="gender">Gender:</label>
        </div>
        <div class="right-row">
          <label><input type="radio" name="gender" value="g-female"> Female</label>
          <label><input type="radio" name="gender" value="g-male"> Male</label>
          <label><input type="radio" name="gender" value="g-other"> Other</label>
        </div>
      </div>
     
      <!--Do you loooikeee -->
      <div class="row">
        <div class="left-row">
          <label>How much do you like candy bar:
        </div>
        <div class="right-row">
          <select id="dropdown" name="like" class="dropdown">
    <option disabled value selected>Select an option</option>
    <option>Not much</option>
    <option>I loOVE it!</option>
    <option>Um, haven't thought about it</option>
  </select>
        </div>
      </div>
      <!--How many... -->
      <div class="row">
        <div class="left-row">
          <label>How many candy bars do you eat in a week?:</label>
        </div>
        <div class="right-row">
          <select id="dropdown" name="gender" class="dropdown">
    <option disabled value selected>Select an option</option>
    <option>1-2 bars</option>
    <option>3-4 bars</option>
    <option>Uncountable?...</option>
      <option>I don't consume any</option>
  </select>
        </div>
      </div>
      <!--Your fav.. -->
      <div class="row">
        <div class="left-row">
          <label>Your favorite candy bar texture:</label>
        </div>
        <div class="right-row">
          <label><input type="checkbox" name="services" value="service1"> Chewy</label>
          <label><input type="checkbox" name="services" value="service2"> Crunchy</label>
          <label><input type="checkbox" name="services" value="service3"> Melty</label>
          <label><input type="checkbox" name="services" value="service4"> Sticky</label>
        </div>
      </div>
      <!--$$$ -->
      <div class="row">
        <div class="left-row">
          <label id="price" for="price">Do you think $2 is over price for a candy bar?:</label>
        </div>
        <div class="right-row">
          <label><input type="radio" name="price" value="p-yes"> Ugh, YES!</label>
          <label><input type="radio" name="price" value="p-no"> Um, no?</label>
        </div>
      </div>
      <!--suggestions -->
      <div class="row">
        <div class="left-row">
          <label>* Suggestions for a better candy bar:</label>
        </div>
        <div class="right-row">
          <textarea id="notes" style="height:50px;resize:vertical;" class="input-area" name="notes" placeholder="I would like to suggest..."></textarea>
        </div>
      </div>
      <form action="/link-path">
        <button id="submit" type="submit">Submit</button>
      </form>
  </div>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Beth+Ellen&display=swap");
@import url("https://fonts.googleapis.com/css?family=Roboto&display=swap");
.number-arrow::-webkit-inner-spin-button,
.numnber-arrow::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
body {
  font-family: "Roboto", sans-serif;
  background-image: url("https://images.unsplash.com/photo-1551578657-a7e74acb0135?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80");
  background-repeat: no-repeat;
			background-position: center center;
			background-size: cover;
  min-width: 320px;
}

#title {
  font-family: "Beth Ellen", cursive;
  font-size: 40px;
  text-align: center;
  color: #5a2600;
}

#title-area {
  max-width: 800px;
  margin: 0 auto;
  width: 75%;
  max-width: 800px;
  padding: 20px 40px;
  border-radius: 30px;
  background: #f6d898;
}

#description {
  text-align: center;
  padding: 0px 0px 20px 0px;
}

#form-bg {
  background-color: rgba(252,246,232,.9);
  // opacity: 0.9;
  margin: 0 auto;
  width: 75%;
  max-width: 780px;
  margin: 10px auto 100px auto;
  padding: 20px 40px 30px 40px;
  border-radius: 0px;
}

.row {
  padding: 0.7em;
}

.left-row {
  display: inline-block;
  text-align: right;
  width: 40%;
  vertical-align: middle;
}

.right-row {
  display: inline-block;
  text-align: left;
  width: 48%;
  vertical-align: middle;
  padding-left: 10px;
}

.input-area {
  height: 20px;
  width: 280px;
  padding: 5px;
  border: 1px solid #c0c0c0;
  border-radius: 8px;
}

.dropdown {
  height: 30px;
  width: 220px;
  padding: 5px;
  border: 1px solid #c0c0c0;
  border-radius: 8px;
}

#submit {
  font-family: "Beth Ellen", cursive;
  font-size: 18px;
  background-color: #5a2600;
  color: #f6d898;
  display: block;
  padding: 10px;
  margin: 50px auto 10px auto;
  border: 0px solid;
  border-radius: 8px;
  cursor: pointer;
}

/*smaller view*/
@media (max-width: 650px) {
  /*For tittle*/
  #title {
    font-size: 25px;
  }

  /*For title-area*/
  #title-area {
    padding: 8px 5px;
  }

  /*Form outer*/
  #form-bg {
    padding: 8px 5px;
  }

  /*For text area/field*/
  .left-row {
    width: 100%;
    text-align: left;
  }

  .right-row {
    padding-top: 8px;
    width: 80%;
    float: left;
  }

  .input-area {
    width: 100%;
  }

  .dropdown {
    width: 100%;
  }

  .row {
    display: flex;
    flex-direction: column;
  }

  #description {
    padding: 10px 5px 0px 5px;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console