Tell us what’s happening:
Test 18 works well in my browser but fails to pass
Your code so far
<!-- file: i<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Job Application Form</title>
<link rel="stylesheet" href="styles.css" >
</head>
<body>
<div class="container">
<h1>Job Application Form</h1>
<p class="subtitle">Please fill out all required fields to apply for the position</p>
<form id="jobApplicationForm">
<div class="form-group">
<label for="name" class="required">Full Name</label>
<input type="text" id="name" name="name" placeholder="Enter your full name" required>
</div>
<div class="form-group">
<label for="email" class="required">Email Address</label>
<input type="email" id="email" name="email" placeholder="Enter your email address" required>
</div>
<div class="form-group">
<label for="position" class="required">Desired Position</label>
<select id="position" name="position" required>
<option value="" disabled selected>Select a position</option>
<option value="frontend">Frontend Developer</option>
<option value="backend">Backend Developer</option>
<option value="fullstack">Full Stack Developer</option>
<option value="uiux">UI/UX Designer</option>
<option value="project-manager">Project Manager</option>
<option value="data-analyst">Data Analyst</option>
</select>
</div>
<fieldset class="radio-group">
<legend class="required">Availability</legend>
<div class="radio-options">
<!-- Radio buttons and labels placed directly, not nested in divs -->
<input type="radio" id="full-time" name="availability" value="full-time" required>
<label for="full-time">Full Time</label>
<input type="radio" id="part-time" name="availability" value="part-time">
<label for="part-time">Part Time</label>
<input type="radio" id="contract" name="availability" value="contract">
<label for="contract">Contract</label>
<input type="radio" id="freelance" name="availability" value="freelance">
<label for="freelance">Freelance</label>
</div>
</fieldset>
<div class="form-group">
<label for="message">Cover Message</label>
<textarea id="message" name="message" placeholder="Tell us why you're interested in this position and why you'd be a good fit..."></textarea>
</div>
<button type="submit">Submit Application</button>
<p class="footer-note">All fields marked with * are required. We'll contact you via email regarding your application.</p>
</form>
</div>
</body>
</html>ndex.html -->
/* file: styles.css * {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: #f5f7fa;
padding: 20px;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.container {
background-color: white;
border-radius: 12px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
padding: 30px;
width: 100%;
max-width: 700px;
}
h1 {
color: #2c3e50;
margin-bottom: 10px;
font-size: 28px;
text-align: center;
}
p.subtitle {
color: #7f8c8d;
text-align: center;
margin-bottom: 30px;
font-size: 16px;
}
form {
display: flex;
flex-direction: column;
gap: 25px;
}
.form-group {
display: flex;
flex-direction: column;
gap: 8px;
}
label {
font-weight: 600;
color: #2c3e50;
font-size: 15px;
}
label.required::after {
content: " *";
color: #e74c3c;
}
input, select, textarea {
padding: 14px 16px;
border: 2px solid #dfe6e9;
border-radius: 8px;
font-size: 16px;
transition: all 0.3s ease;
background-color: #f8f9fa;
}
/* First input field styling */
input:first-of-type {
border-radius: 20px;
background-color: #f0f8ff;
}
/* Focus styling */
input:focus, textarea:focus {
outline: none;
border-color: #3498db;
box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}
/* Valid input styling */
input:valid, select:valid, textarea:valid {
border-color: green;
}
/* Invalid input styling */
input:invalid, select:invalid, textarea:invalid {
border-color: red;
}
/* Radio group styling */
.radio-group {
border: 2px solid #dfe6e9;
border-radius: 8px;
padding: 20px;
background-color: #f8f9fa;
}
.radio-group legend {
font-weight: 600;
color: #2c3e50;
padding: 0 10px;
font-size: 15px;
}
.radio-options {
display: flex;
flex-wrap: wrap;
gap: 20px;
margin-top: 10px;
}
/* Style radio buttons and labels directly */
.radio-group input[type="radio"] {
appearance: none;
width: 22px;
height: 22px;
border: 2px solid #bdc3c7;
border-radius: 50%;
margin: 0;
display: inline-block;
cursor: pointer;
transition: all 0.3s ease;
vertical-align: middle;
}
.radio-group label {
font-weight: 500;
color: #34495e;
cursor: pointer;
transition: all 0.3s ease;
margin-left: 8px;
margin-right: 20px;
vertical-align: middle;
}
/* Style checked radio buttons - Requirements 15, 16, 17 */
.radio-group input[type="radio"]:checked {
border-color: #3498db;
background-color: #3498db;
box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.3);
}
/* Style labels when associated radio button is checked - Requirement 18 */
.radio-group input[type="radio"]:checked + label{
color: #3498db;
font-weight: 600;
}
textarea {
min-height: 150px;
resize: vertical;
line-height: 1.5;
}
button[type="submit"] {
background-color: #3498db;
color: white;
border: none;
padding: 16px 30px;
border-radius: 8px;
font-size: 18px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
margin-top: 10px;
}
/* Button hover styling */
button:hover {
background-color: #2980b9;
transform: translateY(-2px);
box-shadow: 0 7px 14px rgba(52, 152, 219, 0.3);
}
.footer-note {
text-align: center;
color: #7f8c8d;
font-size: 14px;
margin-top: 25px;
padding-top: 20px;
border-top: 1px solid #ecf0f1;
} */
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
Challenge Information:
Build a Job Application Form - Build a Job Application Form