so why is checkbox exhibiting inline display properties? and when i change its display properties to block, the checkbox and the text come in 2 different lines.
also why is the submit button and refresh button not getting centralized?
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>freecodecamp Survey Form</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1 id="title">freecodecamp Survey Form</h1>
<p id="description"> your feedback is valuable! </p>
<form id="survey-form">
<fieldset>
<label id="name-label">Name: <input type="text" name="name" id="name" required placeholder="abc"> </label>
<label id="email-label">Email:<input type="email" name="email" id="email" required placeholder="abc@gmail.com"> </label>
<label id="number-label">Age(optional): <input type="number" name="age" id="number" min=13 max=100 placeholder=20 </label>
</fieldset>
<fieldset>
<label> Which option best decribes your current role?
<select id="dropdown">
<option value=" "> Select</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>
<label> Would you recommend freeCodeCamp to a friend? </label>
<label> <input type="radio" name="recommendation" value="defo">Definitely </label>
<label>
<input type="radio" name="recommendation" value="maybe" >Maybe </label>
<label> <input type="radio" name="recommendation" value="not sure">Not Sure
</label>
<label> What is your favorite feature of freeCodeCamp?
<select id="dropdown2">
<option value=" " >select </option>
<option value="1" >Challenges </option>
<option value="2" >Projects </option>
<option value="3" >Community </option>
<option value="4" >Open Source </option> </select> </label>
<label> What would you like to see improved?</label>
<input type="checkbox" id="imp1" value="Front-end Projects">Front-end Projects
<input type="checkbox" id="imp2" value="Back-end Projects">Back-end Projects
<input type="checkbox" id="imp3" value="Data Visualizations">Data Visualizations
<input type="checkbox" id="imp4" value="Challenges">Challenges
<input type="checkbox" id="imp5" value="Open Source Community">Open Source Community
<input type="checkbox" id="imp6" value="Gitter Help Rooms">Gitter Help Rooms
<input type="checkbox" id="imp7" value="Videos">Videos
<input type="checkbox" id="imp8" value="City Meetups">City Meetups
<input type="checkbox" id="imp9" value="Wiki">Wiki
<input type="checkbox" id="imp10" value="Forum">Forum
<input type="checkbox" id="imp11" value="Additional Courses">Additional Courses
</fieldset>
<label> Suggestions </label>
<textarea id="suggestions" name="suggestions" rows="5" cols="33"
placeholder="Enter your comment here..."></textarea>
<input type="button" id="submit" value="Submit">
<input type="button" id="refesh" value="Refresh">
</form>
</body>
</html>
/* file: styles.css */
label {display:block;
margin: 10 20 ;
}
h1, p {text-align:center;}
fieldset{ margin: 15;}
textarea{margin: 15;}
input[type="checkbox"] {
margin-left: 8px;
margin-bottom: 10px;
}
input[type="button"]{margin: auto;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
Challenge: Survey Form - Build a Survey Form
Link to the challenge: