Tell us what’s happening:
I have spent many hours trying figure out Step 15 of th Build a job application form, but I still get this. * Failed: 15. You should use the :checked
pseudo-class on radio buttons to change the text color of the associated label
when the option is selected.
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">
<title>Job Application Form</title>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<div class="container">
<form>
<input type="text" id="name" >
<input type="email" id="email">
<select id="position">
<option value="1">1</option>
<option value="2">2</option>
</select>
<fieldset class="radio-group" name="availability">
<input type="radio" id="fulltime" name="availability"
<label for="fulltime"Full Time</label>
<input type="radio" id="parttime" name="availability"
<label for="parttime"Part Time</label>
</fieldset>
<textarea id="message"></textarea>
<button type="submit"</submit>
</form>
</div>
</body>
</html>
/* file: styles.css */
input:focus, textarea:focus {border: purple}
input:invalid, select:invalid, textarea:invalid {
border: solid 2px red;
}
input:valid, select:valid, textarea:valid {
border: solid 2px green;
}
button:hover {background-color: orange;}
button:hover {background-color: orange;}
.radio-group input[type="radio"]:checked{
border-color: magenta;
background-color:turquoise;
box-shadow:5px 10px;
}
[type="radio"]:checked + label{color:yellow;
}
input:nth-child(1) {
border-radius: 16px;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0
Challenge Information:
Build a Job Application Form - Build a Job Application Form