When i inspect my form using Chrome, and go to the Responsive tab, when i make the window smaller or select to view on a mobile device, the form is not displayed properly, I’m not sure where I have gone wrong or if I have just missed something in the code, I am still a beginner so any help would be appreciated.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Survey Form</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="heading">
<h1 id="title">Survey Form</h1>
<p id="description">Please fill out my survey to improve my skills</p>
</div>
<form id="survey-form">
<div>
<label id="name-label">Full Name:</label><br><br>
<input required id="name" type="name" name="name" placeholder="Enter your name" class="form-control"><br><br></input>
<label id="email-label">Email:</label><br><br>
<input required id="email" type="email" name="name" placeholder="Enter your Email" class="form-control"></input><br><br>
<label id="number-label">Email:</label><br><br>
<input id="number" type="number" name="number" min="13" max="100" placeholder="Enter your Age" class="form-control"></input><br><br>
<label>Which option best describes your current role?</label><br><br>
<div>
<select id="dropdown" type="role" name="role"><br><br>
<option value="selectrole">Select Your Role</option>
<option value="student">Student</option>
<option value="fulltimelearner">Full Time Learner</option>
<option value="fulltimejob">Full Time Job</option>
<option value="prefernottosay">Prefer not to say</option>
<option value="other">Other</option>
</select>
</div>
<div>
<label>Would you recommend freeCodeCamp to a friend?</label><br><br>
<input name="user-recommend" type="radio" class="recommend" value="Definately">Definately</input><br><br>
<input name="user-recommend" type="radio" class="recommend" value="Maybe">Maybe</input><br><br>
<input name="user-recommend" type="radio" class="recommend" value="NotSure">Not Sure</input><br><br>
<input name="user-recommend" type="radio" class="recommend" value="No">No</input><br><br>
</div>
<label>What is your favorite feature of freeCodeCamp?</label><br><br>
<select id="feature" type="feature" name="feature"><br><br>
<option value="selectrole">Select an option</option>
<option value="challenges">Challenges</option>
<option value="projects">Projects</option>
<option value="community">Community</option>
<option value="opensource">Open Source</option>
<option value="other">Other</option>
</select>
<div id="content2">
<label id="checkbox"> What would you like to see improved? (Check all that apply)</label><br><br>
<input type="checkbox" value="Front-end-Projects" class="recommend">Front-end Projects</input><br><br>
<input type="checkbox" value="Back-end-Projects" class="recommend">Back-end Projects</input><br><br>
<input type="checkbox" value="Data-Visualization" class="recommend">Data Visualization</input><br><br>
<input type="checkbox" value="Challenges" class="recommend">Challenges</input><br><br>
<input type="checkbox" value="Open-Source-Community" class="recommend">Open Source Community</input><br><br>
<input type="checkbox" value="Gitter-help-rooms" class="recommend">Gitter help rooms</input><br><br>
<input type="checkbox" value="Videos" class="recommend">Videos</input><br><br>
<input type="checkbox" value="City Meetups" class="recommend">City Meetups</input><br><br>
<input type="checkbox" value="Wiki" class="recommend">Wiki</input><br><br>
<input type="checkbox" value="Forum" class="recommend">Forum</input><br><br>
<input type="checkbox" value="Additional-Courses" class="recommend">Additional Courses</input><br><br>
<label name="suggestions"> Any comments or suggestions?</label><br><br>
<textarea id="suggestions" placeholder="Enter your comments here:"></textarea><br><br>
<input id="submit" type="submit"></input>
</div>
</div>
</form>
</body>
</html>
body {
background-image: url(https://img.freepik.com/free-photo/forest-landscape_71767-127.jpg?w=996&t=st=1707668077~exp=1707668677~hmac=dac9ca7bd9a381d0003aef5b1c6beb4eeba525edf70ae8cd9ad111d44ba71026);
background-size: cover;
background-attachment: fixed;
color: #fff;
}
.heading {
text-align: center;
width: 100%;
margin: 0;
}
#title {
font-size: 1.8em;
}
#description {
font-size: 18px;
}
#survey-form {
background-color: rgba(0,0,0,0.7);
padding-top: 34px;
padding-bottom: 34px;
display: flex;
justify-content: center;
align-items: center;
margin: auto;
margin-top: 10px;
width: 40%;
border-radius: 10px;
}
form .form-control {
width: 98.5%;
position: relative;
height: 1.8em;
border-radius: 5px;
border: 0;
bottom: 10px;
}
#dropdown {
width: 98.5%;
position: relative;
height: 1.8em;
border-radius: 5px;
border: 0;
bottom: 10px;
}
#feature {
width: 98.5%;
position: relative;
height: 1.8em;
border-radius: 5px;
border: 0;
bottom: 10px;
}
#suggestions {
width: 98.5%;
position: relative;
height: 5em;
border-radius: 5px;
border: 0;
bottom: 10px;
}
#submit {
width: 98.5%;
position: relative;
height: 3em;
border-radius: 5px;
border: 0;
bottom: 10px;
background-color: green;
color: #fff;
}
#content2 {
margin-top: 10px;
padding: 0;
}