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

              
                 <h1 id="title">Survey Form</h1>
  <div id="form-outer">
    <p id="description">Website satisfaction</p>
    <form id="survey-form"
          name="survey-form">
      <div class="rowTab">
        <div class="labels">
          <label for="name"
               id="name-label">* Name:</label>
        </div>
        <div class="rightTab">
          <input autofocus=""
               class="input-field"
               id="name"
               name="name"
               placeholder="Enter your name"
               required=""
               type="text">
        </div>
      </div>
      <div class="rowTab">
        <div class="labels">
          <label for="email"
               id="email-label">* Email:</label>
        </div>
        <div class="rightTab">
          <input class="input-field"
               id="email"
               name="email"
               placeholder="Enter your Email"
               required=""
               type="email">
        </div>
      </div>
      <div class="rowTab">
        <div class="labels">
          <label for="age"
               id="number-label">* Age:</label>
        </div>
        <div class="rightTab">
          <input class="input-field"
               id="number"
               max="125"
               min="1"
               name="age"
               placeholder="Age"
               type="number">
        </div>
      </div>
      <div class="rowTab">
        <div class="labels">
          <label for="currentPos">Which option best describes your current role?</label>
        </div>
        <div class="rightTab">
          <select class="dropdown"
               id="dropdown"
               name="currentPos">
            <option disabled
                    selected
                    value="">
              Select an option
            </option>
            <option value="student">
              Student
            </option>
            <option value="job">
              Full Time Job
            </option>
            <option value="preferNo">
              Prefer not to say
            </option>
            <option value="other">
              Other
            </option>
          </select>
        </div>
      </div>
      <div class="rowTab">
        <div class="labels">
          <label for="userRating">* How would you rate our website?</label>
        </div>
        <div class="rightTab">
          <ul style="list-style: none;">
            <li class="radio"><label>Very satisfied<input class="userRatings"
                   name="radio-buttons"
                   type="radio"
                   value="1"></label></li>
            <li class="radio"><label>Somewhat satisfied<input class="userRatings"
                   name="radio-buttons"
                   type="radio"
                   value="2"></label></li>
            <li class="radio"><label>Neutral<input class="userRatings"
                   name="radio-buttons"
                   type="radio"
                   value="3"></label></li>
            <li class="radio"><label>Somewhat dissatisfied<input class="userRatings"
                   name="radio-buttons"
                   type="radio"
                   value="4"></label></li>
            <li class="radio"><label>Very dissatisfied<input class="userRatings"
                   name="radio-buttons"
                   type="radio"
                   value="5"></label></li>
          </ul>
        </div>
      </div>
      <div class="rowTab">
        <div class="labels">
          <label for="most-like">How likely are you to visit our website again?</label>
        </div>
        <div class="rightTab">
          <select class="dropdown"
               id="most-like"
               name="mostLike">
            <option disabled
                    selected
                    value="">
              Select an option
            </option>
            <option value="Very likely">
              Very likely
            </option>
            <option value="Somewhat likely">
              Somewhat likely
            </option>
            <option value="Neutral">
              Neutral
            </option>
            <option value="Somewhat unlikely">
              Somewhat unlikely
            </option>
            <option value="Very unlikely">
              Very unlikely
            </option>
          </select>
        </div>
      </div>
      <div class="rowTab">
        <div class="labels">
          <label for="preferences">What was your primary reason for visiting our website?<br>
          (Check all that apply):</label>
        </div>
        <div class="rightTab">
          <ul id="preferences"
              style="list-style: none;">
            <li class="checkbox"><label><input class="userRatings"
                   name="prefer"
                   type="checkbox"
                   value="1">Seeking company information</label></li>
            <li class="checkbox"><label><input class="userRatings"
                   name="prefer"
                   type="checkbox"
                   value="2">Seeking product information</label></li>
            <li class="checkbox"><label><input class="userRatings"
                   name="prefer"
                   type="checkbox"
                   value="3">Seeking contact information</label></li>
            <li class="checkbox"><label><input class="userRatings"
                   name="prefer"
                   type="checkbox"
                   value="4">Product purchased</label></li>
            <li class="checkbox"><label><input class="userRatings"
                   name="prefer"
                   type="checkbox"
                   value="5">To findcalendar/schedule</label></li>
            <li class="checkbox"><label><input class="userRatings"
                   name="prefer"
                   type="checkbox"
                   value="6">Store hours</label></li>
            <li class="checkbox"><label><input class="userRatings"
                   name="prefer"
                   type="checkbox"
                   value="7">Store location /directions</label></li>
          </ul>
        </div>
      </div>
      <div class="rowTab">
        <div class="labels">
          <label for="comments">Do you have any suggestions for improvement?</label>
        </div>
        <div class="rightTab">
          <textarea class="input-field"
               id="comments"
               name="comment"
               placeholder="Enter your comment here..."
               style="height:50px;resize:vertical;"></textarea>
        </div>
      </div><button id="submit"
            type="submit">Submit</button>
    </form>
  </div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Raleway:400,500);

html,
body {
  background-color: #0a325f;
  text-align: center;
  font-family: 'Raleway', Helvetica, sans-serif;
  min-width: 320px;
}

header {
  font-size: 2em;
  font-weight: bold;
  margin: 20px;
}

#form-outer {
  background-color: rgb(250, 250, 250);
  margin: 0 auto;
  border-radius: 25px;
  width: 75%;
  max-width: 900px;
  padding: 10px;
  padding-top: 20px;
  -webkit-border-radius: 25px;
  -moz-border-radius: 25px;
  -ms-border-radius: 25px;
  -o-border-radius: 25px;
}

.labels {
  display: inline-block;
  text-align: right;
  width: 40%;
  padding: 5px;
  vertical-align: top;
  margin-top: 10px;
}

.rightTab {
  display: inline-block;
  text-align: left;
  width: 48%;
  vertical-align: middle;
}

.input-field {
  height: 20px;
  width: 280px;
  padding: 5px;
  margin: 10px;
  border: 1px solid #c0c0c0;
  border-radius: 2px;
}

#userAge {
  width: 40px;
}

.userRatings,
input[type="checkbox"] {
  float: left;
  margin-right: 5px;
}

#submit {
  background-color: #59ace0;
  border-radius: 4px;
  color: white;
  font-size: 1em;
  height: 40px;
  width: 96px;
  margin: 10px;
  border: 0px solid;
}

.dropdown {
  height: 35px;
  width: 140px;
  padding: 5px;
  margin: 10px;  
  margin-top: 15px;
  border: 1px solid #c0c0c0;
  border-radius: 2px;
}

.radio, .checkbox {
  position: relative;
  left: -43px;
  margin-left: 10px;
  display: block;
  padding-bottom: 10px;
}

@media screen and (max-width: 833px) {
  .input-field {
    width: 80%;
  }
  select {
    width: 90%;
  }
}

@media screen and (max-width: 520px) {
  .labels {
    width: 100%;
    text-align: left;
  }
  .rightTab {
    width: 80%;
    float: left;
  }
  .input-field {
    width: 100%;
  }
  select {
    width: 100%;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console