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

              
                <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">  
  <title>w-digital survey</title>
  <link href="https://fonts.googleapis.com/css?family=Lora|Montserrat" rel="stylesheet">
  <link rel="stylesheet" href="https://codepen.io/chriscoyier/pen/YrbNGP.css">
  <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js
"></script>
  
</head>
<body>
  <div class="container app-container">
    <header id="header">
      <h1 id="title">Site Survey Form</h1>
      <p id="description" class="text-center">
        This is a survey to conduct how w-digital.co site been going
        <br>
        (typeform.com inspired)
      </p>
    </header>
    <main id="main">
      <section class="paper-form">
        <form action="" id="survey-form">
          <ol>
            <li class="question-item active">
              <label id="name-label" for="name" class="question">Hello my name is Windo, What's yours ?</label>
              <p class="description">You can tell me your nickname</p>
              <input type="text" class="input" id="name" placeholder="Joe, or Diana, just the name please" required>
              <input type="button" value="enter" class="input">
              <span class="input button-description">
                press <b>enter</b>
              </span>
            </li>
            <li class="question-item">
              <label id="email-label" for="email" class="question">What is your email ?</label>
              <p class="description">e.g. i-love@forms.com</p>
              <input type="email" class="input" id="email" placeholder="e.g. ilove@form.com" required>
              <input type="button" value="enter" class="input">
              <span class="input button-description">
                press <b>enter</b>
              </span>
            </li>
            <li class="question-item">
              <label id="number-label" for="number" class="question">and, your age ?</label>
              <p class="description">it's just a number, but we have to ask anyway as a reminder</p>
              <input type="number" class="input" id="number" min="1" max="150" placeholder="-" required>
              <input type="button" value="enter" class="input">
              <span class="input button-description">
                press <b>enter</b>
              </span>
            </li>
            <li class="question-item">
              <label for="dropdown" id="label-role" class="question">What is your current role ?</label>
                <select name="role" id="dropdown">
                <option value="student">Student</option>
                <option value="employeeFullTime">Employee (full time)</option>
                <option value="employeePartTime">Employee (part time)</option>
                <option value="freelance">freelance</option>
                <option value="workingMom">Working Mom</option>
                <option value="other">other</option>
              </select>
            </li>
            <li class="question-item">
              <p class="question">How likely is that you would recommend w-digital.co to a friend?</p>
              <p class="description">Do you like our service ? our product ? do you like me ? yes ? </p>
              <label for="radio-Definitely">
                <input type="radio" value="definitely" id="radio-Definitely" name="recommend" checked>
                Definitely
              </label>
              <label for="radio-Maybe">
                <input type="radio" value="maybe" id="radio-Maybe" name="recommend">
                Maybe
              </label>
              <label for="radio-NotSure">
                <input type="radio" value="notSure" id="radio-NotSure" name="recommend">
                NotSure
              </label>
            </li>
            <li class="question-item">
              <p class="question">Things that should be improved in the future</p>
              <p class="description">Check all that apply</p>
              <label for="landing-page">
                <input type="checkbox" value="landing-page" name="futureImprovement">
                Landing Page
              </label>
                <label for="project-page">
                <input type="checkbox" id="project-section" value="project-section" name="futureImprovement">
                Project Section
              </label>
              <label for="playground-section">
                <input type="checkbox" id="playground-section"  value="playground-section" name="futureImprovement">
                Playground Section
              </label>
              <label for="about-page">
                <input type="checkbox" id="about-page" value="about-page" name="futureImprovement">
                About Page
              </label>
              <label for="resume-pdf">
                <input type="checkbox" id="resume-pdf" value="resume-pdf" name="futureImprovement">
                Resume (PDF)
              </label>
            </li>
            
            <li class="question-item">
              <label for="suggestion" class="question">Any Comment or Suggestion ?</label>
              <p class="description">Maybe something this survey didn't cover</p>
              <textarea name="suggestion" id="suggestion" cols="30" rows="10" id="suggestion" class="textarea"></textarea>
              <input type="button" value="enter" class="input">
              <span class="input button-description">
                press <b>enter</b>
              </span>
            </li>            
          </ol>
          
          <div class="question-item">
            <p class="question text-center">Thanks!</p>
            <button id="submit" class="button big-finish-btn">Submit my answers</button>            
          </div>

        </form>

      </section>
    </main>
    <footer id="footer">
      <p>2018 - <a href="https://w-digital.co" alt="Windo personal site">Herwindo Artono</a>
      </p>
    </footer>
  </div>
</body>
</html>
              
            
!

CSS

              
                /* Layout */
.container {
  display: grid;
  width: 100%;
  grid-template-columns: 19% 61.8% 19%;
  grid-template-rows: 200px 1fr 100px;
  grid-template-areas: 
    "header header header"
    "main main main"
    "footer footer footer";
}
header#header {
  grid-area: header;
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
  align-items: center;
}
main#main {
  grid-area: main;
}
footer#footer {
  grid-area: footer;
}
#header, #main, #footer {
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
  align-items: center;
}


/* styling */
.app-container {
  background: linear-gradient(360deg, hsl(80, 50%, 80%), hsl(90, 50%, 90%));
  color: hsl(180, 80%, 15%);
  font-family: 'Montserrat', sans-serif;
  padding: 0 2em;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Lora', serif;
  line-height: 1.2em;
}
p#subtitle {
  opacity: .618;
}
.paper-form { 
/*   background-color: hsl(180, 70%, 90%);
  box-shadow: 1em 1em 20px 5px rgba(0, 0, 0, .06);
  border-radius: .2em;
  border: 1px solid rgba(255, 255, 255, .618);
  padding: 4em 2em; 
  width: 61.8%; */  
  display: flex;
  justify-content: center;
}
.question-item {
  margin-bottom: 3em;
/*   opacity: .16; */
  color: hsl(180, 80%, 15%);
}
.question-item.active {
  opacity: 1;
}
.question-item > .question {
  font-family: 'Lora', serif;
  font-size: 1.618em;
  margin-bottom: 0;
}
.question-item > .description {
  opacity: .5;
  margin-bottom: 0;
}
.question-item > .button {
  width: 100%;
}
.question-item > [type="text"], 
.question-item > [type="email"],
.question-item > [type="number"]
{
  border: none;  
  font-family: 'Lora', serif;
  padding-bottom: .16em;
  background-color: transparent;
  border-bottom: 1px solid white;
  outline: none;
  font-size: 1.618em;
  line-height: 1.618em;
  color: rgba(255, 100, 75, 1);
  margin: .618em 0;
}
.question-item > [type="text"],
.question-item > [type="email"] {
    width: 100%;
}

.question-item > [type="button"], .button {
  border: none;
  margin: 1em .38em;
  outline: none;  
  background-color: rgba(255, 255, 255, 1);
}

.question-item > [type="button"]:hover, .button:hover {
  background-color: rgba(255, 255, 255, .618);  
  cursor: pointer;
}
.question-item > .button-description {
  opacity: .618;
}
.app-container ol li {
  padding-left: .618em;
}
.question-item > .textarea {
  border: none;
  width: 100%;
  margin-top: .618em;
}
::placeholder {
  opacity: .3;
  color: hsl(180, 80%, 15%);
}

/* utility */
.text-center {
  text-align: center;
}
.big-finish-btn {
  position: relative;
  font-size: 1.2em;
  line-height: 2em;  
  color: blue;
  background-color: lightblue;
  border-radius: 1em;
  border: 2px solid blue;
  box-shadow: .3em .3em 0px 0px rgba(0, 100, 255, .16);
}
.big-finish-btn:hover {
  background-color: blue;
  color: white;
}
              
            
!

JS

              
                
              
            
!
999px

Console