Tell us what’s happening:
I am totally at a loss with Step 18:
18. You should use the :checked pseudo-class on radio buttons to change the text color of the associated label when the option is selected.
I searched the forum and the web and tried everything and nothing works. Many people seem to have troubles with this step so maybe a special explanation or a hint would be good? I hope someone has some advice for me. 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">
<form>
<label for="name"><input type="text" id="name" placeholder="Full Name" required>
Full Name</label>
<label for="email"><input type="email" id="email" placeholder="Email" required>Email</label>
<select id="position">
<option value="chief">Chief</option>
<option value="Ass">Assistant</option>
</select>
<fieldset class="radio-group" name="availability" >
<legend>Availability</legend>
<label for="fulltime"><input type="radio" id="fulltime" name="availability">
Full Time</label>
<label for="part"><input type="radio" id="part" name="availability">
Part Time</label>
</fieldset>
<textarea id="message"></textarea>
<button type="submit">Submit</button>
</form>
</div>
</body>
</html>
/* file: styles.css */
input:focus, textarea:focus {
border-color: blue;
}
input:invalid, select:invalid, Textarea:invalid {
border-color: red;
}
input:valid, select:valid, textarea:valid {
border-color: green;
}
button:hover {
background-color: black;
}
.radio-group input[type="radio"]:checked {
border-color:orange;
background-color: yellow;
box-shadow: 0 4px 8px gray;
}
.radio-group input[type="radio"] + label {
color:brown;
}
input:first-of-type {
color:black;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0
Challenge Information:
Build a Job Application Form - Build a Job Application Form