cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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>
  
  <head>
    
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Inquire | A survcey template by Pius Wong">
    <meta name="author" content="Pius Wong | www.piuswong.com">

    <meta property="og:site_name" content="Inquire | A survcey template by Pius Wong" />
    <meta property="og:title" content="Inquire | A survcey template by Pius Wong" />
    <meta property="og:url" content=# />
    <meta property="og:type" content="website" />
    <meta property="og:description" content="A template for a survey form" />
    <meta property="og:image" content=# />
    <meta name="twitter:card" content="summary_large_image" />
    <meta name="twitter:site" content="Inquire | A survcey template by Pius Wong" />
    <meta name="twitter:creator" content="@PiusWong">
    <meta name="twitter:title" content="Inquire | A survcey template by Pius Wong" />
    <meta name="twitter:description" content="A template for a survey form" />
    <meta name="twitter:image" content=# />

    <link href="https://fonts.googleapis.com/css?family=Oxygen|Prata|Shadows+Into+Light" rel="stylesheet">
    <link href='main.css' rel='stylesheet'>
    
  </head>
  
  <body>
    
    <header>
      <h1 id="title">Inquire.</h1>
      <h2>A paper-themed responsive survey form template using CSS Grid and Flexbox, by <a href="http://www.piuswong.com" title="Browse some of Pius's projects.">Pius Wong</a></h2>
    </header>
    
    <main>
      
      <div class="separator">
        ***
      </div>
      
      <form id="survey-form" class="survey-form-full-width">
        
        <div class="form-header">
          <p id="description">
            Hello! Help us learn more about you.
          </p>
        </div>
        
        <div class="form-inputs">
          
          <div class="input-item-container">
            <div class="input-label">
              <label for="name" id="name-label">
                * Name:
              </label>
            </div>
            <div class="input-item">
              <div class="input-bg paper">
                <input type="text" id="name" name="name" required placeholder="Enter your first and last name.">
              </div>
            </div>
          </div>
          
          <div class="input-item-container">
            <div class="input-label">
              <label for="email" id="email-label">
                * Email:
              </label>
            </div>
            <div class="input-item">
              <div class="input-bg paper">
                <input type="email" id="email" name="email" required placeholder="Enter your email address.">
              </div>
            </div>
          </div>          

          <div class="input-item-container">
            <div class="input-label">
              <label for="location">
                * Your Location:
              </label>
            </div>
            <div class="input-item">
              <div class="input-bg paper">
                <input type="text" id="location" name="location" required placeholder="City, state, and/or country.">
              </div>
            </div>
          </div>     

          <div class="input-item-container">
            <div class="input-label">
              <label for="number" id="number-label">
                How many podcasts do you listen to, approximately?
              </label>
            </div>
            <div class="input-item">
              <div class="input-bg paper input-short">
                <input type="number" id="number" name="number" placeholder="0" min="0" max="99">
              </div>
            </div>
          </div>             
          
          <div class="input-item-container">
            <div class="input-label">
              <label for="listen">
                How do you like to subscribe or listen to your podcasts?
              </label>
            </div>
            <div class="input-item">
              <div class="input-bg paper input-dropdown">
                <select name="listen">
                  <option value="notsure">No preference</option>
                  <option value="apple">Apple Podcasts / iTunes</option>
                  <option value="soundcloud">SoundCloud</option>
                  <option value="google">Google Play</option>
                  <option value="stitcher">Stitcher</option>
                  <option value="radiopublic">Radio Public</option>
                  <option value="other">Other / Not listed</option>
                </select>
              </div>
            </div>
          </div>               

         <div class="input-item-container">
            <div class="input-label">
              <legend for="recommend" required>
                * How likely are you to talk about a podcast with a friend or colleague?
              </legend>
            </div>
            <div class="input-item">
              <fieldset class="input-bg paper input-radio input-short">
                <div>
                  <label for="maybe">
                    <input id="maybe" type="radio" name="recommend" value="maybe">
                    <span>Maybe</span>
                  </label>
                </div>
                <div>
                  <label for="definitely">
                    <input id="definitely" type="radio" name="recommend" value="definitely">
                    <span>Definitely</span>
                  </label>
                </div>
                <div>
                  <label for="notlikely">
                    <input id="notlikely" type="radio" name="recommend" value="notlikely">
                    <span>Not likely</span>
                  </label>
                </div>
              </fieldset>
            </div>
          </div>           
          
          <div class="input-item-container">
            <div class="input-label">
              <label for="notes">
                Do you ever check show notes or transcripts for podcast episodes?
              </label>
            </div>
            <div class="input-item">
              <div class="input-bg paper input-dropdown input-short">
                <select name="notes" id="dropdown">
                  <option disabled selected value="disabled">My answer...</option>
                  <option value="no">No</option>
                  <option value="yes">Yes, often</option>
                  <option value="sometimes">Yes, sometimes</option>
                  <option value="rarely">Rarely</option>
                </select>
              </div>
            </div>
          </div>                 
          
          <div class="input-item-container">
            <div class="input-label">
              <legend for="interests">
                What podcast topics most interest you, out of these options?
              </legend>
            </div>
            <div class="input-item">
              <fieldset class="input-bg paper input-checkbox">
                <div>
                  <label for="interest-teachers">
                    <input id="interest-teachers" type="checkbox" name="recommend" value="teachers">
                    <span>Teachers and Teaching</span>
                  </label>
                </div>
                <div>
                  <label for="interest-business">
                    <input id="interest-business" type="checkbox" name="recommend" value="business">
                    <span>Business and EdTech</span>
                  </label>
                </div>
                <div>
                  <label for="interest-design">
                    <input id="interest-design" type="checkbox" name="recommend" value="design">
                    <span>Design Thinking</span>
                  </label>
                </div>
                <div>
                  <label for="interest-young">
                    <input id="interest-young" type="checkbox" name="recommend" value="young">
                    <span>Education for Younger Children</span>
                  </label>
                </div>
                <div>
                  <label for="interest-engineers">
                    <input id="interest-engineers" type="checkbox" name="recommend" value="engineers">
                    <span>Engineers at Work and at Play</span>
                  </label>
                </div>
                <div>
                  <label for="interest-culture">
                    <input id="interest-culture" type="checkbox" name="recommend" value="culture">
                    <span>Cultural Comparisons</span>
                  </label>
                </div>
                <div>
                  <label for="interest-equity">
                    <input id="interest-equity" type="checkbox" name="recommend" value="equity">
                    <span>Equity and Diversity</span>
                  </label>
                </div>
                <div>
                  <label for="interest-research">
                    <input id="interest-research" type="checkbox" name="recommend" value="research">
                    <span>Research and Data</span>
                  </label>
                </div>
                <div>
                  <label for="interest-cs">
                    <input id="interest-cs" type="checkbox" name="recommend" value="cs">
                    <span>Computer Science and Coding</span>
                  </label>
                </div>
                <div>
                  <label for="interest-fundamentals">
                    <input id="interest-fundamentals" type="checkbox" name="recommend" value="fundamentals">
                    <span>Engineering Fundamentals</span>
                  </label>
                </div>
              </fieldset>
            </div>
          </div>           

          <div class="input-item-container">
            <div class="input-label">
              <label for="comments">
                Any other comments or suggestions:
              </label>
            </div>
            <div class="input-item">
              <div class="input-bg paper">
                <textarea type="textarea" id="comments" name="comments" placeholder="Enter your comments here..." rows="5"></textarea>
              </div>
            </div>
          </div>
          
        </div>
        
        <div class="form-submit">
          <input type="submit" id="submit">
        </div>
        
      </form>
      
    </main>
    
    <footer>
      <div>
        Powered by HTML/CSS/JS for <a href="https://learn.freecodecamp.org/responsive-web-design/responsive-web-design-projects/build-a-survey-form/">freeCodeCamp</a>
      </div>
      <div>
        Copyright 2018 <a href="http://www.piuswong.com" title="Browse some of Pius's projects.">Pius Wong</a>
      </div>
    </footer>

  </body>

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

  <!-- 

  Hello Camper!

  For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding! 

  - The freeCodeCamp Team 

  -->
</html>
            
          
!
            
              * {
  -webkit-box-sizing: border-box;
  -mox-box-sizing: border-box;
  -ms-box-sizing: border-box;
  box-sizing: border-box;
}

body{
  text-align: center;
  color: white;
  font-family: 'Oxygen', sans-serif;
  background: #651a14;
  margin: 0;
  -webkit-transition: all 1s;
  -o-transition: all 1s;
  transition: all 1s;
  text-shadow: rgba(255,255,100,0.3) 0px 0px 5px;
}
a {
  text-decoration: none;
  color: hsl(239, 96%, 75%); 
  font-weight: bold;
  -webkit-transition: 0.3s;
  -o-transition: 0.3s;
  transition: 0.3s;
  text-shadow: none;
}
a:hover, a:focus{
  color: hsl(239, 96%, 30%); 
}
a:active {
  color: hsl(239, 96%, 20%);   
}

header{
  margin: 0;
  padding: 10px 0 10px 0;
}
h1, h2, h3{
  font-family: 'Prata', serif;
  font-weight: normal;
}
header h1{
  font-size: 70px;
  margin: 0;
  text-shadow: rgba(255,255,100,0.5) 0px 0px 10px;
}
header h2{
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 0;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}

main {
  margin: 1em;
  font-family: 'Prata', serif;
  font-size: 2em;
}
main .separator {
  margin: 0.5em;
  text-shadow: rgba(255,255,100,0.7) 0px 0px 50px;
}

.survey-form-full-width {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 40% 40% 1fr;
      grid-template-columns: 1fr 40% 40% 1fr;
  -ms-grid-rows: auto auto auto;
      grid-template-rows: auto auto auto;
}
.survey-form-full-width .form-header {
  -ms-grid-row: 1;
  -ms-grid-row-span: 1;
  -ms-grid-column: 2;
  -ms-grid-column-span: 2;
  grid-area: 1/2/2/4;
}
.survey-form-full-width .form-inputs {
  -ms-grid-row: 2;
  -ms-grid-row-span: 1;
  -ms-grid-column: 2;
  -ms-grid-column-span: 2;
  grid-area: 2/2/3/4;
}
.survey-form-full-width .form-submit {
  -ms-grid-row: 3;
  -ms-grid-row-span: 1;
  -ms-grid-column: 2;
  -ms-grid-column-span: 2;
  grid-area: 3/2/4/4;
}
.input-item-container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: no-wrap;
      flex-wrap: no-wrap;
}
.input-label, .input-item {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  margin: 1em;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}
.input-label {
  width: 50%;
  -webkit-box-pack: end;
      -ms-flex-pack: end;
          justify-content: flex-end;
}
.input-item {
  width: 50%;
  -webkit-box-pack: start;
      -ms-flex-pack: start;
          justify-content: flex-start;
}
.input-label {
  text-align: right;
}
.input-bg {
  width: 100%;
  max-width: 400px;
}
.paper {
  color: black;
  background: #fffdf7; /* Background fallback */
  padding: 1em;
  -webkit-box-shadow: rgba(0,0,0,.8) 0px 0px 20px;
          box-shadow: rgba(0,0,0,.8) 0px 0px 20px;
  border-radius: 2px;
  padding: 10px 30px;
  margin: 0;
  /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#fffdf7+0,ffffff+85,fff6b5+100 */
  background: rgb(255,253,247); /* Old browsers */ /* FF3.6-15 */
  background: -webkit-radial-gradient(center, ellipse cover, rgba(255,253,247,1) 0%,rgba(255,255,255,1) 85%,rgba(255,246,181,1) 100%); /* Chrome10-25,Safari5.1-6 */
  background: -webkit-radial-gradient(center, ellipse, rgba(255,253,247,1) 0%,rgba(255,255,255,1) 85%,rgba(255,246,181,1) 100%);
  background: -o-radial-gradient(center, ellipse, rgba(255,253,247,1) 0%,rgba(255,255,255,1) 85%,rgba(255,246,181,1) 100%);
  background: radial-gradient(ellipse at center, rgba(255,253,247,1) 0%,rgba(255,255,255,1) 85%,rgba(255,246,181,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fffdf7', endColorstr='#fff6b5',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}
.input-dropdown{
  max-width: 320px;
}
.input-short{
  max-width: 220px;
}
.input-dropdown-short{
  max-width: 220px;
}
form input, 
form select, 
form .input-radio label, 
form .input-checkbox label,
form textarea {
  font-family: 'Shadows Into Light', cursive;
  font-weight: bold;
  font-size: 24px;
  border: none;
}
fieldset,
form textarea {
  border: none;
}
form input[type="text"],
form input[type="email"],
form input[type="number"],
form select,
form textarea {
  width: 100%;
}
form input::invalid {
  border: red dashed 2px;
}
form .input-radio > div,
form .input-checkbox > div {
  display: block;
  text-align: left;
}
form .input-radio label,
form .input-checkbox label,
form option:disabled,
form textarea::-webkit-input-placeholder {
  color: gray;
}
form .input-radio label,
form .input-checkbox label,
form option:disabled,
form textarea:-ms-input-placeholder {
  color: gray;
}
form .input-radio label,
form .input-checkbox label,
form option:disabled,
form textarea::-ms-input-placeholder {
  color: gray;
}
form .input-radio label,
form .input-checkbox label,
form option:disabled,
form textarea::placeholder {
  color: gray;
}
form input[type="radio"]:checked+span,
form input[type="checkbox"]:checked+span {
  color: black;
}
form input[type="submit"] {
  font-family: inherit;
  margin: 1em;
  font-size: 1.5em;
  padding: 0.5em;
  border-radius: 3px;
  -webkit-transition: 0.3s;
  -o-transition: 0.3s;
  transition: 0.3s;
  -webkit-box-shadow: rgba(0,0,0,0.5) 0 0 50px;
          box-shadow: rgba(0,0,0,0.5) 0 0 50px;
}
form input[type="submit"]:hover {
  background: white;
  -webkit-box-shadow: rgba(0,0,0,0.8) 0 0 100px;
          box-shadow: rgba(0,0,0,0.8) 0 0 100px;
}
footer {
  margin: 1em;
}

@media only screen and (max-width: 768px){
  main {
    margin: 10px;
  }
  .survey-form-full-width .form-header {
    -ms-grid-row: 1;
    -ms-grid-row-span: 1;
    -ms-grid-column: 1;
    -ms-grid-column-span: 4;
    grid-area: 1/1/2/5;
  }
  .survey-form-full-width .form-inputs {
    -ms-grid-row: 2;
    -ms-grid-row-span: 1;
    -ms-grid-column: 1;
    -ms-grid-column-span: 4;
    grid-area: 2/1/3/5;
  }
  .survey-form-full-width .form-submit {
    -ms-grid-row: 3;
    -ms-grid-row-span: 1;
    -ms-grid-column: 1;
    -ms-grid-column-span: 4;
    grid-area: 3/1/4/5;
  }  
  .input-item-container {
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    margin: 0.25em 0 1em 0;
  }
  .input-label, .input-item {
    width: 100%;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    margin: 0.25em;
  }
  .input-label {
    text-align: center;
  }
}
            
          
!
            
              // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

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

Console