Survey Form - Build a Survey Form

Tell us what’s happening:
I feel like it’s going pretty well. The only thing is I don’t understand what descendant of survery form is? I have to add in almost everything and those are the points I am missing. Help is wanted!

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en"></html>
<div>
<head>
  <link rel="stylesheet" type="text/css" href="styles.css"/>
  <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <h1 id="title"><em>freeCodeCamp survey form</h1>
</head>
</div>
<body>
  <div id="first-fieldset-container">
    <fieldset>
  <p id="description"><em>Thank you for taking the time to help us improve the platform</p>
  </fieldset>
  <form id="survey-form" action="action="https://register-demo.freecodecamp.org" class="survery-form"></form>
    <label for="name" type="text" id="name-label">Name: <input id="name"placeholder="Enter your name" required/></label>
    <p></p>
    <label for="email" id="email-label">Email: <input id="email" type="email" placeholder="Enter your email" required/></label>
  <p></p>
    <label for="number" id="number-label">Age(optional): <input id="number" name="number" type="number" placeholder= "Age" min="13" max="102"</label>
    <fieldset>
    <p>Which option best describes your role?</p>
    <select id="dropdown">
      <option value="select">Select current role</option>
      <option value="Student">Student</option>
      <option value="Full time job">Full time job</option>
      <option value="Full time learner">Full time learner</option>
      <option value="Prefer not to say">Prefer not to say</option>
      <option value="other">Other</option>
    </select>
    </fieldset>
    <p>Would you recommend freeCodeCamp to a friend?</p>
    <input type="radio" value="value" name="marketing">Definitely</input>
    <input type="radio" value="value" name="marketing">Maybe</input>
    <input type="radio" value="value" name="value">Not sure</input>
    </select>
    <p>What would you like to see improved?</p>
    </label><p class="smallerfont">(check all that apply)</p>
    <input class="inline" type="checkbox" value="front-end-projects">Front end projects</input>
    <input class="inline" type="checkbox" value="Back-end-projects">Back end projects</input>
  <input class="inline" type="checkbox" value="data-visualization">Data visualization</input>
  </fieldset>
  <p></p>
  <fieldset id="textarea-fieldset">
          <label>Any comments or suggestions?
          <textarea rows="5" cols="5" placeholder="Enter your comment here..."></textarea>
          </label>
   </fieldset>
        <button type="submit" id="submit">Submit</button>
        <p id="space-below-button">&nbsp;</p>
      </form>
</body>
/* file: styles.css */
* {
    font-family: serie-serif;
    font-size: 20px;
    margin-top: 1rem; 
}


input , select , button {
    display: block;
}
input[type="radio"], input[type="checkbox"] {
    display: block;
}

button { background-color:	#F65A83;
    color: white;
    border-color: white;
    font-family: serie-serif;
    border: 1;
    height: 3em;
    width: 9em;
    display: block;
    font-size: 1.1rem;
    margin: 0.5em auto 2em;
}

h1 , p {
  text-align: center;
}

h1 {
    padding-top: 3rem;
}

body {
  color: white;
  background-image: url(https://st.depositphotos.com/1987283/2143/i/600/depositphotos_21430303-stock-photo-a-high-resolution-bright-pink.jpg);
  background-size: cover;
}

input {
  margin:  0 auto;
}

input[type="number"] {
    width: 4rem;
    height: 3rem;
    
    margin-left: 0.2rem;
}


.smallerfont {
  display:inline-block;
  margin: 1 auto;
  font-style: italic;
}



label {
  display: block;
  margin: 0.5rem 0;
}

form {
  margin: 0 auto;
  width: 1.5rem;
  max-width: 500px;
  min-width: 300px;
}

fieldset {
  width: 12rem;
  border: 1;
  border-color: white;
  box-sizing: 100%;
  margin: 0 auto;
  background-color: #F65A83;
  display: block;
}


#description {
  padding-bottom: 2rem;
}

div:first-of-type {
  margin-bottom: -2rem;
}


input, textarea, select {
  width: 100%;
}

.inline {
    width: unset;
    margin: 1 0 0.5em 0;
    vertical-align: middle;
}

input , textarea {
  border: 2px;
  min-height: 3em;
}

select {
  border: 1px solid;
  min-height: 3em;
}

#textarea-fieldset {
    margin-bottom: 2rem;
}

div {
  margin: 0 auto;
  max-width: 1000px;
  background-color: #FF87B2;
  padding-bottom: 0;
}

#space-below-button {
    margin-bottom: 2rem;
}

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

And my radiobuttons are HUGE how can I reduce them to a smaller size, also my checkboxes are tiny… same question? How can I change the sizing?

The html elements in question should be found inside the ‘form’ element.

For the CSS issue, change the min-height property:

input, textarea {
    border: 2px;
    /* min-height: 3em; */
}

You should get something like this:


Play with it around in order to get better looking result.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.