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>
  <title>#2 Survey Form</title>
  <meta charset="UTF-8">
  <meta name="description" content="FCC Responsive Web Design Cerrification Projects">
  <meta name="keywords" content="Free HTML, CSS Certification">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

<body>
  <header id="survey-title">
    <h1 id="title">SOBAT AMBYAR SURVEY</h1>
    <p id="description">Demographics Info Sobat Ambyar Community</p>
  </header>
  <form id="survey-form" action="https://codepen.io/sobadrdb/full/yLYGORB">
    <div class="choose">
      <div class="choice">
        <label class="addtext" for="name" id="name-label">NAME</label>
        <label class="addtext" for="email" id="email-label">EMAIL</label>
      </div>
      <div class="choice bigchoice">
        <input id="name" type="text" name="name" placeholder="Your Full Name" autofocus required>
        <input id="email" type="email" name="email" placeholder="Your Email Address" required>
      </div>
    </div>
    <div class="choose">
      <div class="addtext">GENDER & AGE</div>
      <div class="choice">
        <label for="pria"><input id="pria" value="pria" type="radio" name="gender" checked /> Male</label>
        <label for="wanita"><input id="wanita" value="wanita" type="radio" name="gender" /> Female</label>
      </div>
      <div class="choice">
        <input id="number" type="number" name="age" min="13" max="100" placeholder="Age" required />
        <label for="number" id="number-label"> *Number 13 to 100</label>
      </div>
    </div>
    <div class="choose">
      <div class="addtext">MARITAL STATUS</div>
      <div class="choice">
        <label for="nikah"><input id="nikah" value="nikah" type="radio" name="status" /> Married</label>
        <label for="single"><input id="single" value="single" type="radio" name="status" checked /> Single</label>
        <label for="cerai"><input id="cerai" value="cerai" type="radio" name="status" /> Divorced</label>
      </div>
      <div class="choice">
        <label for="childs"><input id="childs" type="radio" value="childs" name="kids" /> Child/s</label>
        <label for="nochild"><input id="nochild" type="radio" value="nochild" name="kids" checked /> No Child</label>
      </div>
    </div>
    <div class="choose">
      <div class="choice dropmenu">
        <label for="dropdown" class="addtext">OCCUPATION</label></div>
      <div class="choice bigchoice">
        <input class="droplist" name="dropdown" list="dropdown" placeholder="Type or select list">
        <datalist id="dropdown">
          <select name="dropdown">
            <option value="School">School</option>
            <option value="College">College</option>
            <option value="Employee">Employee</option>
            <option value="Civil Servant">Civil Servant</option>
            <option value="Expatriat">Expatriat</option>
            <option value="Bussinessmen">Bussinessmen</option>
            <option value="Job Seeker">Job Seeker</option>
          </select>
        </datalist>
      </div>
    </div>
    <div class="choose">
      <div class="choice addinfo">
        <label class="addtext">MUSIC CHOICES</label>
        <label for="pop">
          <input id="pop" name="music-select" value="pop" type="checkbox"> Pop</label>
        <label for="rock">
          <input id="rock" name="music-select" value="rock" type="checkbox"> Rock</label>
        <label for="classic">
          <input id="classic" name="music-select" value="classic" type="checkbox"> Classic</label>
        <label for="dangdut">
          <input id="dangdut" name="music-select" value="dangdut" type="checkbox"> Dangdut</label>
        <label for="koplo">
          <input id="koplo" name="music-select" value="koplo" type="checkbox"> Koplo</label>
        <label for="campur">
          <input id="campur" name="music-select" value="campur" type="checkbox" checked> Campursari</label>
        <label for="lain"> Others :</label>
        <input id="lain" name="music-select" type="text" placeholder="Type here">
      </div>
      <div class="choice addinfo">
        <label class="addtext">SOCIAL MEDIA</label>
        <label for="twitter">
          <input id="twitter" name="medsos" value="twitter" type="checkbox" checked> Twitter</label>
        <label for="facebook">
          <input id="facebook" name="medsos" value="facebook" type="checkbox"> Facebook</label>
        <label for="instagram">
          <input id="instagram" name="medsos" value="instagram" type="checkbox"> Instagram</label>
        <label for="pinterest">
          <input id="pinterest" name="medsos" value="pinterest" type="checkbox"> Pinterest</label>
        <label for="medlain"> Others :</label>
        <input id="medlain" name="medsos" type="text" placeholder="Type here">
      </div>
    </div>
    <div class="komen-box">
      <label for="komen" class="addtext">ADD COMMENTS</label>
      <textarea id="komen" name="komen" rows="10" cols="30" placeholder="-- Type your comments or suggestions for community to improve --"></textarea>
    </div>
    <div>
      <button id="submit">SUBMIT</button>
    </div>
  </form>
  <footer id="footer">
    <p>Responsive Web Design</p>
    <p>&copy;SoBadRDB 2020</p>
  </footer>
</body>

</html>
              
            
!

CSS

              
                
@import url("https://fonts.googleapis.com/css?family=Poppins:200i,400&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Patrick+Hand+SC&display=swap");

:root {
  --main: rgba(230, 214, 51, 0.8);
  --field: rgba(67, 166, 128, 0.5);
  --text: #f48924;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
  box-sizing: border-box;
}
*,
*:before,
*:after {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
 /* border: 1px dashed cyan;*/
}
body {
  font-family: Poppins;
  font-weight: 600;
}

body:before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: -1;
  background: var(--main);
  background-image: linear-gradient(
      120deg,
      rgba(255, 252, 0, 0.6),
      rgba(255, 255, 255, 0.6)
    ),
    url(https://res.cloudinary.com/sobadrdb/image/upload/q_auto:eco/v1591480503/1-2_yjjqfi.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
}

header {
  padding: 2rem 0;
  margin: auto;
  text-align: center;
}
h1 {
  font-size: 2rem;
  font-weight: 600;
}
p {
  font-size: 1.5rem;
  font-family: "Patrick Hand SC";
}

form {
  width: 100%;
  background: var(--main);
  color: white;
  margin: auto;
  padding: 1rem 0;
}
@media (min-width: 576px) {
  form {
    max-width: 540px;
    padding: 2rem 1rem;
  }
}
@media (min-width: 768px) {
  form {
    max-width: 720px;
    padding: 2rem 2rem;
  }
}

.choose {
  display: flex;
  flex-flow: row wrap;
  width: 100%;
  padding: 0.5rem 0;
  margin: 1rem 0;
}
.choose > * {
  flex: 1 100%;
}
.choice {
  display: flex;
  flex: 1;
  flex-flow: column wrap;
  background: var(--field);
}
.bigchoice {
  justify-content: space-around;
  background: var(--field);
  flex: 2;
}
.dropmenu {
  margin: auto;
}

.addtext {
  display: block;
  text-align: center;
  background: var(--text);
}
.addinfo {
  padding-bottom: 0.7rem;
}
textarea {
  font-size: 1rem;
  width: 100%;
  margin: auto;
  display: block;
  padding: 1rem 0.5rem;
  border: none;
}
.komen-box {
  margin: 2rem auto;
}

#submit, .droplist,
.addtext,
label, select,
input[type="text"],
input[type="email"],
input[type="number"] {
  font-size: 1rem;
  padding: 0.3rem;
  border: none;
}
input {
  cursor: pointer;
}
#name,
#email,
#number,
.droplist,
#lain,
#medlain,
textarea {
  background: #fff591;
  border-radius: 0;
  border-bottom: 3px solid #facf5a;
}
#number {
  margin-top: 0.5rem;
  max-width: 50px;
}
#number-label {
  font-size: 0.8rem;
  font-style: italic;
}
#lain,
#medlain {
  max-width: 150px;
  margin-left: 0.8rem;
}
#submit {
  display: block;
  margin: 1rem auto;
  padding: 0.5rem 2rem;
  color: white;
  font-weight: 600;
  background: var(--field);
  cursor: pointer;
  box-shadow: 1px 1px 2px var(--text);
}
#submit:hover {
  transition: all 0.3s linear;
  transform: scale (1.1);
  background: var(--text);
  box-shadow: 5px 5px 5px var(--field);
}
footer {
  margin-top: 1rem;
}
footer p {
  font-size: 0.8rem;
}

              
            
!

JS

              
                
              
            
!
999px

Console