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

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

    <div class="main">
      <header>
      <h1 id="title">Customer satisfaction survey</h1>
      <p id="description">Thank you for helping us making our store better</p>
      </header>

      <div class="main-content">
        <div class="form-content">
          <form id="survey-form">
            <label id="name-label" for="name">Name</label>
            <input
              type="text"
              id="name"
              placeholder="e.g. Joe Exotic"
              required
            />
            <label id="email-label" for="email">Email</label>
            <input
              type="email"
              id="email"
              placeholder="joe@example.com"
              required
            />
            <label id="number-label" for="number">Age (optional)</label>
            <input
              type="number"
              id="number"
              placeholder="e.g. 25"
              min="18"
              max="99"
            />

            <label for="dropdown">How often do you visit our store?</label>
            <select id="dropdown">
              <option value="" disabled selected hidden>
                Select an option
              </option>
              <option value="once-a-month">Once a month</option>
              <option value="once-a-week">Once a week</option>
              <option value="2-3-week">2-3 times a week</option>
              <option value="everyday">Everyday</option>
            </select>

            <fieldset>
              <legend>Would you recommend our store to a friend?</legend>
              <label for="definitely">
                <input
                  id="definitely"
                  type="radio"
                  name="recommend"
                  value="definitely"
                  checked
                />Definitely</label
              >
              <label for="maybe">
                <input
                  id="maybe"
                  type="radio"
                  name="recommend"
                  value="maybe"
                />Maybe</label
              >
              <label for="not-sure">
                <input
                  id="not-sure"
                  type="radio"
                  name="recommend"
                  value="not-sure"
                />Not sure
              </label>
            </fieldset>
            <label for="dropdown2">What is your favourite department?</label>
            <select name="department" id="dropdown2">
              <option value="" disabled selected hidden>
                Select an option
              </option>
              <option value="produce-dep">Produce Department</option>
              <option value="meat-dep">Meat Department</option>
              <option value="beer-wine">Beer and Wine Section</option>
              <option value="bakery">Bakery</option>
            </select>
             <fieldset>
            <legend>What new would you like to see in our store?</legend> 
           <div class="checkboxes">
            <input
              id="seafood-dep"
              type="checkbox"
              name="new"
              value="seafood-dep"
            />
            <label for="seafood-dep">Seafood Department</label> </div>
            <div class="checkboxes"><input
              id="health-beauty"
              type="checkbox"
              name="new"
              value="health-beauty"
            />
            <label for="health-beauty">Health and Beauty Department</label
              > </div>
           <div class="checkboxes"> <input id="deli" type="checkbox" name="new" value="deli" />
             <label for="deli">Deli/Prepared Food Department</label> </div>
           <div class="checkboxes"> <input
              id="gardening"
              type="checkbox"
              name="new"
              value="gardening"
            /> 
             <label for="gardening">Gardening Section</label> </div>
                </fieldset> 
            <div class="satisfaction">
              <label for="satisfaction"
                >How much are you satisfied with shopping at our store? (1-
                least satisfied, 10- most satisfied)</label
              >
              <input id="satisfaction" type="number" min="1" max="10" />
            </div>
            <label for="comments">Any comments or suggestions? </label>
            
            <textarea id="comments" rows="4" cols="50">
</textarea>
            
            <button id="submit" type="submit">Submit</button>
          </form>
        </div>
      </div>
    </div>


              
            
!

CSS

              
                body{
  font-family: 'PT Sans', sans-serif;
}
.main{
  background-image: url(https://wallpaperaccess.com/full/1624845.jpg);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  color: #ffffff;
  overflow-y: scroll;
  font-size: 24px;
}
.main::after{
  content:"";
  background-color: rgba(0,0,0,0.8);
  position:fixed;
   top: 0;
  left: 0;
  bottom: 0;
  right: 16px;
  }
header {

  text-align: center;
  font-size: 30px;
  z-index: 2;
  position: relative;
  padding-bottom: 15px;
  padding-top: 15px;
  line-height: 1;
}
.main-content{
  background-color: #264653;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  padding: 40px;
    margin: 0 auto; 
  margin-bottom: 40px;
  border-radius: 5px;
  z-index: 2;
  position: relative;
  box-shadow: 0 -1px 10px 5px gray;
}
#name,
#email,
#number,
#dropdown,
#comments,
#dropdown2,
#satisfaction {
  display: block;
  width: 100%;
  height: 35px;
  padding: 5px 10px;
  color: #000;
  background-color: #fff;
  border: 1px solid #eeeeee;
  border-radius: 5px;
  font-size: 20px;
  margin-bottom: 40px;
}
label[for='name'],
label[for='email'],
label[for='number'],
label[for='dropdown'],
label[for='comments'],
label[for='dropdown2'],
label[for='satisfaction'] {
  margin-bottom: 10px;
  display: inline-block;
}
#seafood-dep,
#health-beauty,
#deli,
#gardening,
fieldset input {
  height: 20px;
  width: 20px;
  margin-right: 15px;
  margin-bottom: 30px;
 
}
fieldset {
  display: inline-grid;
  line-height: 1;
  padding-top: 2px;
  padding-bottom: 2px;
} 

#comment {
  min-height: 150px;
}
label[for="dropdown2"]
 {
  margin-top: 30px;
} 
#submit {
  display: block;
  width: 100%;
  padding: 12px;
  background: #37af65;
  border-radius: 2px;
  cursor: pointer;
  border: 0;
  color: #fff;
  font-size: 20px;
}
/* 
.form-content{
  display: flex;
  flex-direction: column;
} */



              
            
!

JS

              
                
              
            
!
999px

Console