Tell us what’s happening:
Hi! My code passes all the tests, but my radio group is ugly. I can’t seem to work out how to get the checkboxes and labels on the same line. Any ideas what I’m doing wrong? Thanks
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>Job Application Form</title>
</head>
<body>
<div class="container">
<h1>Job Application Form</h1>
<form>
<label for="name">Full name:</label>
<input type="text" name="name" id="name" placeholder="Enter your name" size="40">
<label for="email">Email address:</label>
<input type="email" id="email" placeholder="Enter your email" size="40">
<label for="position">Position:</label>
<select name="position" id="position">
<option value="select">Select a position</option>
<option value="designer">Web designer</option>
<option value="developer">Web developer</option>
<option value="manager">Manager</option>
</select><br>
<fieldset class="radio-group">
<legend>Availability</legend>
<input type="radio" name="availability" id="full-time" value="Full-Time">
<label for="full-time">Full-Time</label>
<input type="radio" name="availability" id="part-time" value="Part-Time">
<label for="part-time">Part-Time</label>
</fieldset>
<label for="message">Why do you want this job?</label><br>
<textarea id="message" name="message" rows="8" cols="79" placeholder="Write your answer"></textarea>
<button type="submit" value="Submit">Submit</button>
</form>
</div>
</body>
</html>
/* file: styles.css */
body {
font-family: Verdana, sans-serif;
}
.container {
display: block;
margin: 20px auto;
max-width: 600px;
padding: 50px;
border-radius: 10px;
box-shadow: 0 0 10px #8b939c;
}
h1 {
text-align: center;
}
label {
display: block;
padding: 5px 0px;
margin: 5px 0px;
}
input, select, textarea {
width: 100%;
padding: 5px;
border-radius: 5px;
box-sizing: border-box;
}
.radio-group {
width: 100%;
box-sizing: border-box;
margin: 10px 0;
}
button {
display: block;
padding: 10px 15px;
margin: 10px auto;
color: white;
font-weight: bold;
background-color: #3f88c5;
border: 1px solid #032b43;
border-radius: 5px;
}
input:focus, textarea:focus {
border: 2px solid #3f88c5;
}
input:invalid, select:invalid, textarea:invalid {
border: 2px solid red;
}
input:valid, select:valid, textarea:valid {
border: 2px solid green;
}
button:hover {
background-color: #ffba08;
}
.radio-group input[type="radio"]:checked {
border-color: #032b43;
background-color: #3f88c5;
box-shadow: 0 0 5px #8b939c;
color: #3f88c5;
}
.radio-group input[type="radio"]:checked + label {
color: #3f88c5;
}
input:nth-child(1) {
border-radius: 5px;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Challenge Information:
Build a Job Application Form - Build a Job Application Form