Tell us what’s happening:
hello good day. I have two questions:
firstly, is it compulsory that we do the survey form project with the same content and format as the freeCodeCamp survey form?
secondly, I can seem to get my radio and checkbox buttons to be on the same line with the text, what should I do?
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<title>Basketball Survey Form</title>
<link rel=stylesheet href='styles.css'>
</head>
<body>
<h1 id='title'>Basketball Survey Exercise</h1>
<p id='description'>Fill in the form below for a chance to be selected</p>
<form id='survey-form'>
<fieldset>
<label id='name-label'>Full Name: <input type='text' id='name'placeholder='Enter your name' required /></label>
<label id='email-label'>Email: <input type='email' id='email' placeholder='Enter your emial' required/></label>
<label id='number-label'>Age: <input type='number' id='number' min='7' max='22' placeholder='age' required/></label>
<label> Which option best describes your level of play:
<select id='dropdown'>
<option>(select level)</option>
<option>Novice</option>
<option>Adavnced Beginner</option>
<option>Competent</option>
<option>Proficient</option>
<option>Expert</option>
</select>
</label>
<label> Style of play: </label> <label><input type='radio' name='play-style'class='style' /> Right hand </label>
<label><input type='radio'name='play-style' class='style'/> Left hand </label>
<label><input type='radio'name='play-style' class='style' /> Both </label>
<label>Favourite positions to play? (select all that apply)</label>
<input type='checkbox' value='position-of-play'/> Forward
<input type='checkbox' value='position-of-play'/> Point Guard
<input type='checkbox' value='position-of-play'/> Center
<input type='checkbox' value='position-of-play'/> Small Forward
<label> More info about you: <textarea placeholder='additional info'></textarea></label>
</fieldset>
<input type='submit' value='Submit'/>
</form>
</body>
</html>
/* file: styles.css */
body {
width: 100%;
height: 100vh;
margin: 0;
background-color: #1b1b32;
color: #ffffff;
}
h1, p {
margin: 1em auto;
text-align: center;
}
form {
max-width: 500px;
min-width: 300px;
width: 60vw;
margin: 0 auto;
}
label {
display: block;
margin: 10px;
}
fieldset {
border: 0;
padding: 2rem auto;
}
input, textarea, select {
width: 100%;
margin-top: 10px;
height: 25px;
}
textarea {
width: 250px;
height: 100px
}
input[type='submit'] {
width: 100%;
background-color: #1b1b32;
color: #ffffff;
}
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15
Challenge: Survey Form - Build a Survey Form
Link to the challenge: