Tell us what’s happening:
For the Registration Form how do I align the radio buttons to the left and on a new section? The fieldset elements don’t seem to be working.
Your code so far
<!-- file: index.html -->
<!Doctype html>
<html lang="eng">
<head>
<meta charset "UTF-8">
<title> Registration Form </title>
<link rel="stylesheet" href="styles.css"/>
</html>
<body>
<h1 id="title"> Registration Form </h1>
<p id="description"> Please fill out the information below</p>
<form id="survey-form">
<fieldset>
<label id="name-label"> Name <input id="name" type="text" placeholder="Mary Lew" required /> </label>
<label id="email-label"> Email <input id="email" type="email" placeholder="marylew@gmail.com" required/></label>
<label id="number-label"> Age (optional) <input id="number" type="number" placeholder="18" min="18" max="120" /></label>
</fieldset>
<fieldset>
<p> What field of study are you interested in? </p>
<select id="dropdown" name="study">
<option value=""> Select One</option>
<option value="1"> Science </option>
<option value="2"> Mathematics </option>
<option value="3"> Technology </option>
<option value="4"> Engineering </option>
</fieldset>
<fieldset>
<p> Are you enrolled into any of these studies? </p>
<label id="yes-enrollment"><input id="yes-enrollment" type="radio" name="enrollment" value="yes" > Yes</label>
<label id="no-enrollment" ><input id="no-enrollment" type="radio" name="enrollment" value="no" > No</label>
</fieldset>
/* file: styles.css */
body {
width: 100%;
height: 100vh;
color: black;
margin: 0;
background-color: #E9D0AA;
}
h1, p{
margin: 1em auto;
text-align: center;
}
form {
width: 50vw;
max-width: 500px;
min-width: 300px;
margin: auto;
}
label {
display: block;
margin: 0.5rem 0;
}
input, select {
margin: 10px 0 0 0;
width: 50%;
}
input[type="number"] {
width: 100px;
}
input[type="radio"] {
width: 100px;
}
fieldset {
border: none;
padding: 2rem 0;
border-bottom: 3px solid #C68A5F;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Challenge Information:
Survey Form - Build a Survey Form