Survey Form - Build a Survey Form

Hello,

I need a little help. I don´t know how to put the radio buttons more to the left side of the page. Just it.

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Survey Form</title>
    <link rel="stylesheet" href="styles.css"/>
  </head>
  <body>
    <main>
      <h1>freeCodeCamp Survey Form</h1>
      <p id="description"><em>Thank you for taking the time to help us improve the platform</em></p>
      <form id="survey-form" action='https://register-demo.freecodecamp.org'>
        <fieldset>
          <label for="name">Name <input id="name" type="text" placeholder="Enter your name" required /></label>
          <label for="email">Email <input id="email" type="email" placeholder="Enter your Email" required /></label>
          <label for="age">Age <input id="age" type="number" min="13" max="120" placeholder="Age" required /></label>
          <label for="referrer">Which option best describes your current role?
            <select id="referrer" name="referrer">
              <option value="">Select current role</option>
              <option value="1">Student</option>
              <option value="2">Full Time Job</option>
              <option value="3">Full Time Learner</option>
              <option value="4">Prefer not to say</option>
              <option value="5">Other</option>
            </select>
          </label>
        </fieldset>
        <fieldset>
          <label for="radio-buttom1"> Would you recommend freeCodeCamp to a friend?<input id="radio-buttom1" type="radio" name="recommendation" class="inline" /></label>
          <input id="radio-buttom2" type="radio" name="recommendation" class="inline" />
          <input id="radio-buttom2" type="radio" name="recommendation" class="inline" />
        </fieldset>
      </form>
    </main>
  </body>
</html>
/* file: styles.css */
h1, p{
  text-align: center;
  margin: 1em auto;
}

body {
  width: 100%;
  height: 100vh;
  margin: 0;
  background-color: #000000;
  color: #f5f6f7;
  font-family: Tahoma;
  font-size: 16px;
}

fieldset {
  border: none;
  padding: 2rem 0;
  background-color: #181839;
}

form {
  width: 60vw;
  max-width: 500px;
  min-width: 300px;
  margin: 0 auto;
}

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

input, select {
  margin: 10px 0 0 0;
  width: 100%;
}

input {
  background-color: #ffffff;
  border: 1px solid #0a0a23;
  color: #ffffff;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

if you put your code in a codepen it will be easier to see what you mean (rather than waiting for someone to copy your code somewhere to identify what it is you are trying to do).

1 Like

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