Survey Form - Build a Survey Form

Tell us what’s happening:
Describe your issue in detail here.

hello! I have struggled for quite some time, I cannot for the life of me figure out why my radio button and the text for the Button are on separate lines, I have tried changing up my css to display:block or display:inline it has not changed, thank you in advance!
Your code so far

/* file: index.html */
<head>
 <title>Survey Form</title>
  <meta charset="UTF-8">
  <link rel="stylesheet" href="styles.css" />
  <h1>
FreeCodeCamp Survey Form
</h1>
<p>Thank you for taking the time to help us improve the platform</p>
</head>

<body>
<fieldset>
<form> 
  
 <label>
     Name     
   <input type="text" name="Name" required>
   </label>    
<label>Email
  <input type="text" name="email" required>
  </label>
  <label>
    Age(Optional)
      <input type="number" name="Age" required>
      </label>
      <label>Which option best describes your current role?
       </label>
        <select name="current role">
          <option value="">(select an option)</option>
          <option value="1">Challenges</option>
          <option value="2">Projects</option>
          <option value="3">Community</option>
          <option value="4">Open source</option>
          </select>
        
     <fieldset>Would you recommend freecodecamp to a friend?</fieldset>   
  <label class="block"><input type="radio"  name="def" >Definitely </label>

       
      </fieldset>
      </form>
</body>
</html>
/* file: styles.css */
h1{text-align:center;}

p {text-align: center;}

select{
width:95%;
height:2em;
}

input{
width:95%;
height:2em;}

fieldset{
border:none;
background-color:grey;
width:70%;
margin:auto;}

label, input {display:inline;
margin: 0.5rem 0;}

fieldset{
padding-top: 2em}




label{display:inline;}
body{
color:black;
width: 100%;
height: 100vh;
margin: 0;
background:background: #CE5937;
background: -moz-linear-gradient(left, #CE5937 0%, #1C6EA4 50%, #C59237 100%);
background: -webkit-linear-gradient(left, #CE5937 0%, #1C6EA4 50%, #C59237 100%);
background: linear-gradient(to right, #CE5937 0%, #1C6EA4 50%, #C59237 100%);
font-family: Times New Roman, Times, serif;
font-size: 16px;
}

  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Safari/605.1.15

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

image
Like this?

1 Like

That is exactly what I am trying to do!

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